Changed unwraps to unwrap_or_default

This commit is contained in:
Priyanshu Verma 2022-10-03 14:58:37 +05:30
parent 84c90f5ec8
commit 3c3b2bad01
1 changed files with 3 additions and 1 deletions

View File

@ -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 // 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; continue;
} }