We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Directories::contains_file
1 parent 0765c97 commit 6d0336bCopy full SHA for 6d0336b
crates/vfs/src/loader.rs
@@ -137,10 +137,7 @@ impl Directories {
137
/// Returns `true` if `path` is included in `self`.
138
pub fn contains_file(&self, path: &AbsPath) -> bool {
139
let ext = path.extension().unwrap_or_default();
140
- if self.extensions.iter().all(|it| it.as_str() != ext) {
141
- return false;
142
- }
143
- self.includes_path(path)
+ self.extensions.iter().any(|it| it.as_str() == ext) && self.includes_path(path)
144
}
145
146
0 commit comments