From 3ceb9229c155a43fe1b8e4a88dfaea3ef0c401bd Mon Sep 17 00:00:00 2001 From: Rogier Reerink Date: Sat, 10 Oct 2026 12:17:15 +0200 Subject: [PATCH] Fixed clippy warnings. --- server/src/routes/extractors/auth/bearer.rs | 2 +- server/src/routes/extractors/auth/header.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/routes/extractors/auth/bearer.rs b/server/src/routes/extractors/auth/bearer.rs index 8b872f3..4fab13d 100644 --- a/server/src/routes/extractors/auth/bearer.rs +++ b/server/src/routes/extractors/auth/bearer.rs @@ -35,7 +35,7 @@ where let token_hash = hash_secret(&credentials); let token = repository::tokens::get_by_access_token_hash(&pool, &token_hash) .await - .map_err(|error| BearerError::Repository(error))? + .map_err(BearerError::Repository)? .ok_or(BearerError::InvalidCredentials)?; Ok(crate::domain::Authorization::new(token.user_id)) diff --git a/server/src/routes/extractors/auth/header.rs b/server/src/routes/extractors/auth/header.rs index 531ba26..4c71548 100644 --- a/server/src/routes/extractors/auth/header.rs +++ b/server/src/routes/extractors/auth/header.rs @@ -45,11 +45,11 @@ where .ok_or(AuthHeaderError::MalformedValue)?; if scheme.is_empty() { - return Err(AuthHeaderError::EmptyScheme)?; + return Err(AuthHeaderError::EmptyScheme); } if token.is_empty() { - return Err(AuthHeaderError::EmptyToken)?; + return Err(AuthHeaderError::EmptyToken); } Ok(AuthHeader {