Fixed clippy warnings.

This commit is contained in:
2026-10-10 12:17:15 +02:00
parent 30efddbc20
commit 3ceb9229c1
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ where
let token_hash = hash_secret(&credentials); let token_hash = hash_secret(&credentials);
let token = repository::tokens::get_by_access_token_hash(&pool, &token_hash) let token = repository::tokens::get_by_access_token_hash(&pool, &token_hash)
.await .await
.map_err(|error| BearerError::Repository(error))? .map_err(BearerError::Repository)?
.ok_or(BearerError::InvalidCredentials)?; .ok_or(BearerError::InvalidCredentials)?;
Ok(crate::domain::Authorization::new(token.user_id)) Ok(crate::domain::Authorization::new(token.user_id))
+2 -2
View File
@@ -45,11 +45,11 @@ where
.ok_or(AuthHeaderError::MalformedValue)?; .ok_or(AuthHeaderError::MalformedValue)?;
if scheme.is_empty() { if scheme.is_empty() {
return Err(AuthHeaderError::EmptyScheme)?; return Err(AuthHeaderError::EmptyScheme);
} }
if token.is_empty() { if token.is_empty() {
return Err(AuthHeaderError::EmptyToken)?; return Err(AuthHeaderError::EmptyToken);
} }
Ok(AuthHeader { Ok(AuthHeader {