mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Run into_parts eagerly in more places
This commit is contained in:
committed by
Jonas Platte
parent
ee4727b865
commit
2f2bb99550
@@ -66,9 +66,9 @@ where
|
||||
type Future = BoxFuture<'static, Response>;
|
||||
|
||||
fn call(self, req: Request, state: S) -> Self::Future {
|
||||
Box::pin(async move {
|
||||
let (mut parts, body) = req.into_parts();
|
||||
let (mut parts, body) = req.into_parts();
|
||||
|
||||
Box::pin(async move {
|
||||
if let Ok(lt) = Lt::from_request_parts(&mut parts, &state).await {
|
||||
return self.lhs.call(lt, state).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user