Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lz1998 committed Nov 14, 2023
1 parent e5a7444 commit d715e22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions axum-extra/src/either.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ macro_rules! impl_traits_for_either {

async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> {
$(
if let Ok(value) = $ident::from_request_parts(parts, state).await {
if let Ok(value) = <$ident as FromRequestParts<S>>::from_request_parts(parts, state).await {
return Ok(Self::$ident(value));
}
)*

$last::from_request_parts(parts, state).await.map(Self::$last)
<$last as FromRequestParts<S>>::from_request_parts(parts, state).await.map(Self::$last)
}
}

Expand Down

0 comments on commit d715e22

Please sign in to comment.