From 9ae02a747f01e7ad69cc044c5d17cc784ac117d4 Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 9 Jan 2023 16:31:01 -0600 Subject: [PATCH] clippy --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5a92d46..2b0fe60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,14 +83,14 @@ async fn block_user_agents( blocked: Rc>, ) -> Result, actix_web::Error> { let Some(user_agent) = req.headers().get(USER_AGENT) else { - return Err(ErrorBadRequest(MissingUserAgent).into()); + return Err(ErrorBadRequest(MissingUserAgent)); }; let user_agent = user_agent.to_str().map_err(ErrorBadRequest)?.to_lowercase(); for part in blocked.iter() { if user_agent.contains(part.as_str()) { - return Err(ErrorBadRequest(InvalidUserAgent).into()); + return Err(ErrorBadRequest(InvalidUserAgent)); } }