From ddade366dc7e0096ba47d35f3d6ffd016feecce2 Mon Sep 17 00:00:00 2001 From: Esteban Borai Date: Fri, 9 Oct 2020 20:59:41 -0300 Subject: [PATCH] fix: unneeded variable on main handler --- src/handler/main_handler.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/handler/main_handler.rs b/src/handler/main_handler.rs index 41b0d08c..31f84058 100644 --- a/src/handler/main_handler.rs +++ b/src/handler/main_handler.rs @@ -7,10 +7,11 @@ use tiny_http::{Request, Response, ResponseBox}; pub fn main_handler(req: Request, fexplorer: &FileExplorer) -> (Request, ResponseBox) { match req.method().to_string().to_lowercase().as_str() { "get" => file_explorer(req, fexplorer), - _ => { - let response = Response::from_string("Method Not Allowed").with_status_code(405); - - (req, response.boxed()) - } + _ => ( + req, + Response::from_string("Method Not Allowed") + .with_status_code(405) + .boxed(), + ), } }