File tree Expand file tree Collapse file tree 2 files changed +1
-109
lines changed Expand file tree Collapse file tree 2 files changed +1
-109
lines changed Original file line number Diff line number Diff line change @@ -282,15 +282,7 @@ impl<State> Request<State> {
282
282
283
283
/// Get the URL querystring.
284
284
pub fn query < T : serde:: de:: DeserializeOwned > ( & self ) -> crate :: Result < T > {
285
- // Default to an empty query string if no query parameter has been specified.
286
- // This allows successful deserialisation of structs where all fields are optional
287
- // when none of those fields has actually been passed by the caller.
288
- let query = self . url ( ) . query ( ) . unwrap_or ( "" ) ;
289
- serde_qs:: from_str ( query) . map_err ( |e| {
290
- // Return the displayable version of the deserialisation error to the caller
291
- // for easier debugging.
292
- crate :: Error :: from_str ( StatusCode :: BadRequest , format ! ( "{}" , e) )
293
- } )
285
+ self . req . query ( )
294
286
}
295
287
296
288
/// Take the request body as a `Body`.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments