File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/handlers/http/cluster Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ impl<T: DeserializeOwned + 'static> FromRequest for JsonWithSize<T> {
288
288
289
289
// Check the size limit
290
290
if byte_size > limit {
291
- return Err ( ErrorPayloadTooLarge ( byte_size) . into ( ) ) ;
291
+ return Err ( ErrorPayloadTooLarge ( byte_size) ) ;
292
292
}
293
293
294
294
// Extend our buffer with the chunk
@@ -299,8 +299,8 @@ impl<T: DeserializeOwned + 'static> FromRequest for JsonWithSize<T> {
299
299
let bytes = body. freeze ( ) ;
300
300
301
301
// Deserialize the JSON payload
302
- let json = serde_json :: from_slice :: < T > ( & bytes )
303
- . map_err ( |e| JsonPayloadError :: Deserialize ( e ) ) ?;
302
+ let json =
303
+ serde_json :: from_slice :: < T > ( & bytes ) . map_err ( JsonPayloadError :: Deserialize ) ?;
304
304
305
305
Ok ( JsonWithSize { json, byte_size } )
306
306
} )
You can’t perform that action at this time.
0 commit comments