aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_vfs/src')
-rw-r--r--crates/ra_vfs/src/lib.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs
index ced86740b..90d5e21f4 100644
--- a/crates/ra_vfs/src/lib.rs
+++ b/crates/ra_vfs/src/lib.rs
@@ -59,12 +59,8 @@ impl RootFilter {
59 if !(self.file_filter)(path) { 59 if !(self.file_filter)(path) {
60 return None; 60 return None;
61 } 61 }
62 if !(path.starts_with(&self.root)) { 62 let path = path.strip_prefix(&self.root).ok()?;
63 return None; 63 RelativePathBuf::from_path(path).ok()
64 }
65 let path = path.strip_prefix(&self.root).unwrap();
66 let path = RelativePathBuf::from_path(path).unwrap();
67 Some(path)
68 } 64 }
69} 65}
70 66