summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/token/extract/identity.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/token/extract/identity.rs b/src/token/extract/identity.rs
index 60ad220..8b3cd94 100644
--- a/src/token/extract/identity.rs
+++ b/src/token/extract/identity.rs
@@ -25,16 +25,7 @@ impl FromRequestParts<App> for Identity {
type Rejection = LoginError<Internal>;
async fn from_request_parts(parts: &mut Parts, state: &App) -> Result<Self, Self::Rejection> {
- // After Rust 1.82 (and #[feature(min_exhaustive_patterns)] lands on
- // stable), the following can be replaced:
- //
- // ```
- // let Ok(identity_token) = IdentityToken::from_request_parts(
- // parts,
- // state,
- // ).await;
- // ```
- let identity_token = IdentityToken::from_request_parts(parts, state).await?;
+ let Ok(identity_token) = IdentityToken::from_request_parts(parts, state).await;
let RequestedAt(used_at) = RequestedAt::from_request_parts(parts, state).await?;
let secret = identity_token.secret().ok_or(LoginError::Unauthorized)?;