We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c14995 commit 45f59f4Copy full SHA for 45f59f4
1 file changed
src/workspace_traverse.rs
@@ -6,15 +6,12 @@ impl Workspace {
6
walkdir::WalkDir::new(&self.path)
7
.min_depth(1)
8
.into_iter()
9
- .filter(|e| {
10
- e.is_ok()
11
- && !e
12
- .as_ref()
13
- .unwrap()
14
- .file_name()
15
- .to_str()
16
- .unwrap_or(".")
17
- .starts_with('.')
+ .filter(|e| match e {
+ Ok(entry) => {
+ !entry.file_name().to_str().unwrap_or(".").starts_with('.')
+ && !entry.path().is_dir()
+ }
+ Err(_) => false,
18
})
19
.map(|file| file.unwrap().into_path())
20
.collect()
0 commit comments