Remove UrlParamsMap and UrlParams (#154)

Use `extract::Path` instead.
This commit is contained in:
David Pedersen
2021-08-07 21:22:08 +02:00
committed by GitHub
parent 6a82dd75ea
commit a6b3e09827
6 changed files with 12 additions and 232 deletions
+2 -1
View File
@@ -830,8 +830,9 @@ where
///
/// ```
/// use axum::{routing::nest, prelude::*};
/// use std::collections::HashMap;
///
/// async fn users_get(params: extract::UrlParamsMap) {
/// async fn users_get(extract::Path(params): extract::Path<HashMap<String, String>>) {
/// // Both `version` and `id` were captured even though `users_api` only
/// // explicitly captures `id`.
/// let version = params.get("version");