aboutsummaryrefslogtreecommitdiff
path: root/server/src/main.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-03-18 10:46:39 +0100
committermetamuffin <metamuffin@disroot.org>2024-03-18 10:46:39 +0100
commit7d410d53274fdd6840261c286bc2785222256436 (patch)
tree807ac6f960f4c8c9d026111311ec8d8490002157 /server/src/main.rs
parent0825cb66e63a0af09f0c0945542d412091010f73 (diff)
downloadkeks-meet-7d410d53274fdd6840261c286bc2785222256436.tar
keks-meet-7d410d53274fdd6840261c286bc2785222256436.tar.bz2
keks-meet-7d410d53274fdd6840261c286bc2785222256436.tar.zst
clippy
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);