File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ impl Body {
277
277
pub async fn into_json < T : DeserializeOwned > ( mut self ) -> crate :: Result < T > {
278
278
let mut buf = Vec :: with_capacity ( 1024 ) ;
279
279
self . read_to_end ( & mut buf) . await ?;
280
- Ok ( serde_json:: from_slice ( & buf) . status ( StatusCode :: UnprocessableEntity ) ? )
280
+ serde_json:: from_slice ( & buf) . status ( StatusCode :: UnprocessableEntity )
281
281
}
282
282
283
283
/// Creates a `Body` from a type, serializing it using form encoding.
@@ -346,7 +346,7 @@ impl Body {
346
346
/// ```
347
347
pub async fn into_form < T : DeserializeOwned > ( self ) -> crate :: Result < T > {
348
348
let s = self . into_string ( ) . await ?;
349
- Ok ( serde_urlencoded:: from_str ( & s) . status ( StatusCode :: UnprocessableEntity ) ? )
349
+ serde_urlencoded:: from_str ( & s) . status ( StatusCode :: UnprocessableEntity )
350
350
}
351
351
352
352
/// Create a `Body` from a file.
You can’t perform that action at this time.
0 commit comments