From c11a8d26258f049327294914dccc7ad374ae5f74 Mon Sep 17 00:00:00 2001 From: Anas Elgarhy Date: Thu, 23 Feb 2023 13:42:23 +0200 Subject: [PATCH] Refactor search_for function to accept mutable max_depth parameter --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a537a62..95bf962 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,7 +69,7 @@ pub fn get_embedded_art(track_path: &str) -> std::io::Result std::io::Result> { let mut search_directory = if Path::new(search_directory).is_file() { @@ -88,7 +88,6 @@ pub fn search_for( info!("Searching for a file that matches the regular {regx:?} expression in \"{search_directory}\" and its subdirectories."); info!("Max depth: {max_depth}"); } - let mut max_depth = max_depth; loop { if let Some(path) = search(search_directory, regx)? {