More docs

This commit is contained in:
David Pedersen
2021-06-08 22:04:28 +02:00
parent 1f8b39f05d
commit 1cf78fa807
6 changed files with 392 additions and 58 deletions
+7 -1
View File
@@ -248,7 +248,13 @@ async fn extracting_url_params() {
.post(
|_: Request<Body>, params_map: extract::UrlParamsMap| async move {
assert_eq!(params_map.get("id").unwrap(), "1337");
assert_eq!(params_map.get_typed::<i32>("id").unwrap(), 1337);
assert_eq!(
params_map
.get_typed::<i32>("id")
.expect("missing")
.expect("failed to parse"),
1337
);
},
),
);