Skip to content

Commit 2af0a7a

Browse files
committed
lints: fix clippy lints
1 parent 7236637 commit 2af0a7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/body.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl Body {
277277
pub async fn into_json<T: DeserializeOwned>(mut self) -> crate::Result<T> {
278278
let mut buf = Vec::with_capacity(1024);
279279
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)
281281
}
282282

283283
/// Creates a `Body` from a type, serializing it using form encoding.
@@ -346,7 +346,7 @@ impl Body {
346346
/// ```
347347
pub async fn into_form<T: DeserializeOwned>(self) -> crate::Result<T> {
348348
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)
350350
}
351351

352352
/// Create a `Body` from a file.

0 commit comments

Comments
 (0)