mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Fix: revert complex conditional in Directories::contains_file
This reverts commit 6d0336b2e4
.
This commit is contained in:
parent
7ee6cca3d7
commit
ae1288eeed
1 changed files with 4 additions and 1 deletions
|
@ -137,7 +137,10 @@ impl Directories {
|
||||||
/// Returns `true` if `path` is included in `self`.
|
/// Returns `true` if `path` is included in `self`.
|
||||||
pub fn contains_file(&self, path: &AbsPath) -> bool {
|
pub fn contains_file(&self, path: &AbsPath) -> bool {
|
||||||
let ext = path.extension().unwrap_or_default();
|
let ext = path.extension().unwrap_or_default();
|
||||||
self.extensions.iter().any(|it| it.as_str() == ext) && self.includes_path(path)
|
if self.extensions.iter().all(|it| it.as_str() != ext) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.includes_path(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if `path` is included in `self`.
|
/// Returns `true` if `path` is included in `self`.
|
||||||
|
|
Loading…
Reference in a new issue