Skip to content

Commit

Permalink
lints: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishrock123 committed May 10, 2022
1 parent 7236637 commit 2af0a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl Body {
pub async fn into_json<T: DeserializeOwned>(mut self) -> crate::Result<T> {
let mut buf = Vec::with_capacity(1024);
self.read_to_end(&mut buf).await?;
Ok(serde_json::from_slice(&buf).status(StatusCode::UnprocessableEntity)?)
serde_json::from_slice(&buf).status(StatusCode::UnprocessableEntity)
}

/// Creates a `Body` from a type, serializing it using form encoding.
Expand Down Expand Up @@ -346,7 +346,7 @@ impl Body {
/// ```
pub async fn into_form<T: DeserializeOwned>(self) -> crate::Result<T> {
let s = self.into_string().await?;
Ok(serde_urlencoded::from_str(&s).status(StatusCode::UnprocessableEntity)?)
serde_urlencoded::from_str(&s).status(StatusCode::UnprocessableEntity)
}

/// Create a `Body` from a file.
Expand Down

0 comments on commit 2af0a7a

Please sign in to comment.