Skip to content

Commit

Permalink
Unhide the handler definition for clarity
Browse files Browse the repository at this point in the history
The URI example is not referring to the handler defined in the previous
subsection (Deriving `UriDisplay`) but to the handler in the subsection
before that (Typed URIs). Unhiding brings that definition into
rememberance for the user again so the example makes sense.
  • Loading branch information
paulvt committed Jun 15, 2021
1 parent b04ebbb commit 009a5b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/guide/5-responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ generated.
```rust
# #[macro_use] extern crate rocket;

# #[get("/<id>/<name>?<age>")]
# fn person(id: Option<usize>, name: &str, age: Option<u8>) { /* .. */ }
#[get("/<id>/<name>?<age>")]
fn person(id: Option<usize>, name: &str, age: Option<u8>) { /* .. */ }

/// Note that `id` is `Option<usize>` in the route, but `id` in `uri!` _cannot_
/// be an `Option`. `age`, on the other hand, _must_ be an `Option` (or `Result`
Expand Down

0 comments on commit 009a5b1

Please sign in to comment.