From 8fc181201e31cb4222a9be7f2087aee924dc028c Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Fri, 30 Jul 2021 08:15:33 +0200 Subject: [PATCH] refactor: remove needless borrow on static file and handle modules --- src/handler.rs | 2 +- src/static_files.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index ee03ef7..4abb266 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -76,7 +76,7 @@ impl RequestHandler { // Append `Cache-Control` headers for web assets if self.opts.cache_control_headers { - control_headers::append_headers(&uri_path, &mut resp); + control_headers::append_headers(uri_path, &mut resp); } // Append security headers diff --git a/src/static_files.rs b/src/static_files.rs index 6c9974f..a9371d0 100644 --- a/src/static_files.rs +++ b/src/static_files.rs @@ -234,7 +234,7 @@ async fn read_directory_entries( ); } - let current_path = percent_decode_str(&base_path).decode_utf8()?.to_owned(); + let current_path = percent_decode_str(base_path).decode_utf8()?.to_owned(); let dirs_str = if dirs_count == 1 { "directory" } else { -- libgit2 1.7.2