mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Run into_parts eagerly in more places
This commit is contained in:
committed by
Jonas Platte
parent
ee4727b865
commit
2f2bb99550
@@ -101,9 +101,12 @@ where
|
||||
{
|
||||
type Rejection = <Self as FromRequestParts<S>>::Rejection;
|
||||
|
||||
async fn from_request(req: Request, state: &S) -> Result<Self, Self::Rejection> {
|
||||
fn from_request(
|
||||
req: Request,
|
||||
state: &S,
|
||||
) -> impl Future<Output = Result<Self, Self::Rejection>> {
|
||||
let (mut parts, _) = req.into_parts();
|
||||
Self::from_request_parts(&mut parts, state).await
|
||||
async move { Self::from_request_parts(&mut parts, state).await }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user