Skip to content

Commit ae1288e

Browse files
committed
Fix: revert complex conditional in Directories::contains_file
This reverts commit 6d0336b.
1 parent 7ee6cca commit ae1288e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/vfs/src/loader.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ impl Directories {
137137
/// Returns `true` if `path` is included in `self`.
138138
pub fn contains_file(&self, path: &AbsPath) -> bool {
139139
let ext = path.extension().unwrap_or_default();
140-
self.extensions.iter().any(|it| it.as_str() == ext) && self.includes_path(path)
140+
if self.extensions.iter().all(|it| it.as_str() != ext) {
141+
return false;
142+
}
143+
self.includes_path(path)
141144
}
142145

143146
/// Returns `true` if `path` is included in `self`.

0 commit comments

Comments
 (0)