From c165ff05461269d6a144467679358c4256bba64b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 29 Nov 2017 03:28:31 +0000 Subject: [PATCH] Refactorying main.rs : remove unused variable (empty_pattern) --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 57e2a29..0b42b25 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,8 +48,7 @@ fn main() { let matches = app::build_app().get_matches(); // Get the search pattern - let empty_pattern = String::new(); - let pattern = matches.value_of("pattern").unwrap_or(&empty_pattern); + let pattern = matches.value_of("pattern").unwrap_or(""); // Get the current working directory let current_dir = Path::new(".");