diff options
Diffstat (limited to 'src/types/extract.rs')
-rw-r--r-- | src/types/extract.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/types/extract.rs b/src/types/extract.rs index e79aa7a..4d92a3b 100644 --- a/src/types/extract.rs +++ b/src/types/extract.rs @@ -85,10 +85,9 @@ where type Rejection = Response; async fn from_request(req: Request<B>, state: &S) -> Result<Self> { - let body = match parse_body(req, state).await { Ok(body) => body, - Err(err) => return Err(err) + Err(err) => return Err(err), }; let Ok(value) = serde_json::from_str::<T>(&body) else { @@ -128,7 +127,7 @@ where B: HttpBody + Sync + Send + 'static, B::Data: Send, B::Error: Into<BoxError>, - S: Send + Sync + S: Send + Sync, { let Ok(ClientIp(ip)) = req.extract_parts::<ClientIp>().await else { tracing::error!("Failed to read client ip"); |