summaryrefslogtreecommitdiff
path: root/src/user/routes/logout
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-05-21 22:43:52 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-05-21 22:49:57 -0400
commit841fc1355ecef4636ad9f5ad6d081f72eeb868ac (patch)
treed94cbcf5b6edbe8b0aa12bfd0604a31e97afe6e3 /src/user/routes/logout
parentb3fcd627ae57cd0587363eaf2d5f4635a82bda60 (diff)
Remove a bunch of clippy suppressions.
Notably, one of them was hiding a real (if unreachable) bug, by converting a "the token you have presented is not valid" scenario into an internal server error.
Diffstat (limited to 'src/user/routes/logout')
-rw-r--r--src/user/routes/logout/post.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/user/routes/logout/post.rs b/src/user/routes/logout/post.rs
index bb09b9f..0ac663e 100644
--- a/src/user/routes/logout/post.rs
+++ b/src/user/routes/logout/post.rs
@@ -38,10 +38,13 @@ pub struct Error(#[from] pub app::ValidateError);
impl IntoResponse for Error {
fn into_response(self) -> Response {
let Self(error) = self;
- #[allow(clippy::match_wildcard_for_single_variants)]
match error {
- app::ValidateError::InvalidToken => Unauthorized.into_response(),
- other => Internal::from(other).into_response(),
+ app::ValidateError::InvalidToken | app::ValidateError::LoginDeleted => {
+ Unauthorized.into_response()
+ }
+ app::ValidateError::Name(_) | app::ValidateError::Database(_) => {
+ Internal::from(error).into_response()
+ }
}
}
}