Skip to content

Commit

Permalink
Merge pull request #79 from EspressoSystems/feat/params
Browse files Browse the repository at this point in the history
Improve request parameter ergonomics.
  • Loading branch information
jbearer authored Aug 22, 2022
2 parents 1d6d076 + a3e98eb commit 0ab847d
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 112 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ url = "2.2.2"
signal-hook-async-std = "0.2.2"

[dev-dependencies]
ark-serialize = { version = "0.3.0", features = ["derive"] }
ark-std = "0.3.0"
async-tungstenite = { version = "0.17", features = ["async-std-runtime"] }
portpicker = "0.1"
tracing-test = "0.2"
2 changes: 1 addition & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ impl<State, Error> Api<State, Error> {
///
/// # fn ex(api: &mut Api<State, tide_disco::RequestError>) {
/// api.post("replace", |req, state| async move {
/// *state = req.u64_param("new_state")?;
/// *state = req.integer_param("new_state")?;
/// Ok(())
/// }.boxed());
/// # }
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<State: Send + Sync + 'static, Error: 'static> App<State, Error> {
///
/// If you set an application version, it is a good idea to use the version of the application
/// crate found in Cargo.toml. This can be automatically found at build time using the
/// environment variable `CARGO_PKG_VERSION` and the [env] macro. As long as the following code
/// environment variable `CARGO_PKG_VERSION` and the [env!] macro. As long as the following code
/// is contained in the application crate, it should result in a reasonable version:
///
/// ```
Expand Down
Loading

0 comments on commit 0ab847d

Please sign in to comment.