From 7d410d53274fdd6840261c286bc2785222256436 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 18 Mar 2024 10:46:39 +0100 Subject: clippy --- server/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/src/main.rs') 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 */ #![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 { let code = if err.is_not_found() { StatusCode::NOT_FOUND - } else if let Some(_) = err.find::() { + } else if err + .find::() + .is_some() + { StatusCode::BAD_REQUEST - } else if let Some(_) = err.find::() { + } else if err.find::().is_some() { StatusCode::METHOD_NOT_ALLOWED } else { error!("unhandled rejection: {:?}", err); -- cgit v1.2.3-70-g09d2