From 3c3b2bad015b694e1b88f0ada558d06bb37e4f5d Mon Sep 17 00:00:00 2001 From: Priyanshu Verma Date: Mon, 3 Oct 2022 14:58:37 +0530 Subject: [PATCH] Changed unwraps to unwrap_or_default --- src/db/stream.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/db/stream.rs b/src/db/stream.rs index 2ec8deb..0a18973 100644 --- a/src/db/stream.rs +++ b/src/db/stream.rs @@ -84,7 +84,9 @@ impl<'db, 'file> Stream<'db, 'file> { } // Check if working directory only mode is on and do the check if it is a sub directory of the working directory - if self.workingdir && !dir.path.starts_with(env::current_dir().unwrap().to_str().unwrap()) { + if self.workingdir + && !dir.path.starts_with(env::current_dir().unwrap_or_default().to_str().unwrap_or_default()) + { continue; }