summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-18 23:46:36 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-18 23:46:36 -0400
commit98440618a39c39b2dae3f8d1976a0d5505f46761 (patch)
tree5cc9e5ca38da26bd93e0a08127d5564a1c93e5a6
parent82338ddcb7f14ffbd584a954689f02b6e6a7988e (diff)
BREAKING: Remove redundant error conversions now that 1.82 is stable.
MSRV is now 1.82.
-rw-r--r--Cargo.toml1
-rw-r--r--src/token/extract/identity.rs11
2 files changed, 2 insertions, 10 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 2587c80..f978605 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
name = "hi"
version = "0.1.0"
edition = "2021"
+rust-version = "1.82"
[dependencies]
argon2 = "0.5.3"
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)?;