From 4f4591bfdccd891a2b18edf166768805c8c99345 Mon Sep 17 00:00:00 2001 From: DJRHails Date: Tue, 19 May 2020 12:50:18 +0100 Subject: [PATCH] Correct Err return to prevent panic --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 41c62d6..9c0b802 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,7 +98,7 @@ fn run() -> Result { // Check if we have no valid search paths. if dir_vec.is_empty() { - anyhow!("No valid search paths given."); + return Err(anyhow!("No valid search paths given.")); } if matches.is_present("absolute-path") {