Skip to content

Commit

Permalink
Removed redundant Snafu from error type.
Browse files Browse the repository at this point in the history
  • Loading branch information
pictographer committed Jul 15, 2022
1 parent e9b76a6 commit 1a78896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum RequestError {
},

#[snafu(display("Unable to compose JSON"))]
JsonSnafu,
Json,
}

/// Parameters passed to a route handler.
Expand Down Expand Up @@ -240,7 +240,7 @@ impl RequestParams {
where
T: serde::de::DeserializeOwned,
{
serde_json::from_slice(&self.post_data.clone()).map_err(|_| RequestError::JsonSnafu {})
serde_json::from_slice(&self.post_data.clone()).map_err(|_| RequestError::Json {})
}
}

Expand Down

0 comments on commit 1a78896

Please sign in to comment.