Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs/src/vfs_path.rs')
-rw-r--r--crates/vfs/src/vfs_path.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs
index ffd673573a..39a1666421 100644
--- a/crates/vfs/src/vfs_path.rs
+++ b/crates/vfs/src/vfs_path.rs
@@ -73,9 +73,8 @@ impl VfsPath {
pub fn starts_with(&self, other: &VfsPath) -> bool {
match (&self.0, &other.0) {
(VfsPathRepr::PathBuf(lhs), VfsPathRepr::PathBuf(rhs)) => lhs.starts_with(rhs),
- (VfsPathRepr::PathBuf(_), _) => false,
(VfsPathRepr::VirtualPath(lhs), VfsPathRepr::VirtualPath(rhs)) => lhs.starts_with(rhs),
- (VfsPathRepr::VirtualPath(_), _) => false,
+ (VfsPathRepr::PathBuf(_) | VfsPathRepr::VirtualPath(_), _) => false,
}
}
@@ -357,7 +356,7 @@ impl VirtualPath {
if !res.pop() {
return None;
}
- path = &path["../".len()..]
+ path = &path["../".len()..];
}
path = path.trim_start_matches("./");
res.0 = format!("{}/{}", res.0, path);