aboutsummaryrefslogtreecommitdiff
path: root/server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main.rs')
-rw-r--r--server/src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index 306aa98..56566db 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -4,6 +4,7 @@
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
#![feature(lazy_cell)]
+#![allow(clippy::let_with_type_underscore)]
pub mod assets;
pub mod config;
pub mod idgen;
@@ -137,9 +138,12 @@ async fn run() {
async fn handle_rejection(err: Rejection) -> Result<impl Reply, Infallible> {
let code = if err.is_not_found() {
StatusCode::NOT_FOUND
- } else if let Some(_) = err.find::<warp::filters::body::BodyDeserializeError>() {
+ } else if err
+ .find::<warp::filters::body::BodyDeserializeError>()
+ .is_some()
+ {
StatusCode::BAD_REQUEST
- } else if let Some(_) = err.find::<warp::reject::MethodNotAllowed>() {
+ } else if err.find::<warp::reject::MethodNotAllowed>().is_some() {
StatusCode::METHOD_NOT_ALLOWED
} else {
error!("unhandled rejection: {:?}", err);