diff options
author | Bernardo <[email protected]> | 2019-01-25 21:13:55 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-26 08:46:37 +0000 |
commit | 410a3ae6e847b59f9930ce4d6bf9f3c5f1d72167 (patch) | |
tree | 5717d124c71de13412f61a8584b119da378828ae /crates/ra_vfs/src/lib.rs | |
parent | d63e1cebff771621b90bdce25ac013eecb415e1e (diff) |
use entry file_type, improve test
Diffstat (limited to 'crates/ra_vfs/src/lib.rs')
-rw-r--r-- | crates/ra_vfs/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs index 661892f8a..d1b0222e7 100644 --- a/crates/ra_vfs/src/lib.rs +++ b/crates/ra_vfs/src/lib.rs | |||
@@ -62,7 +62,8 @@ impl RootFilter { | |||
62 | 62 | ||
63 | pub(crate) fn entry_filter<'a>(&'a self) -> impl FnMut(&DirEntry) -> bool + 'a { | 63 | pub(crate) fn entry_filter<'a>(&'a self) -> impl FnMut(&DirEntry) -> bool + 'a { |
64 | move |entry: &DirEntry| { | 64 | move |entry: &DirEntry| { |
65 | if entry.path().is_dir() && self.excluded_dirs.iter().any(|it| it == entry.path()) { | 65 | if entry.file_type().is_dir() && self.excluded_dirs.iter().any(|it| it == entry.path()) |
66 | { | ||
66 | // do not walk nested roots | 67 | // do not walk nested roots |
67 | false | 68 | false |
68 | } else { | 69 | } else { |