1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

Fix typo in Query extractor docs (#1777)

This commit is contained in:
Pouya Mobasher Behrouz 2020-11-06 17:04:42 +03:30 committed by GitHub
parent e5b86d189c
commit 9b42333fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ use crate::request::HttpRequest;
/// }
///
/// // Use `Query` extractor for query information (and destructure it within the signature).
/// // This handler gets called only if the request's query string contains a `username` field.
/// // This handler gets called only if the request's query string contains `id` and `response_type` fields.
/// // The correct request for this handler would be `/index.html?id=64&response_type=Code"`.
/// async fn index(web::Query(info): web::Query<AuthRequest>) -> String {
/// format!("Authorization request for client with id={} and type={:?}!", info.id, info.response_type)
@ -117,7 +117,7 @@ impl<T: fmt::Display> fmt::Display for Query<T> {
/// }
///
/// // Use `Query` extractor for query information.
/// // This handler get called only if request's query contains `username` field
/// // This handler get called only if request's query contains `id` and `response_type` fields.
/// // The correct request for this handler would be `/index.html?id=64&response_type=Code"`
/// async fn index(info: web::Query<AuthRequest>) -> String {
/// format!("Authorization request for client with id={} and type={:?}!", info.id, info.response_type)