mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +00:00
parent
b1a2d01645
commit
e336a96998
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ impl FileSetConfig {
|
|||
Ok(it) => it,
|
||||
Err(it) => it.saturating_sub(1),
|
||||
};
|
||||
if path.starts_with(&self.roots[idx].0) {
|
||||
if !self.roots.is_empty() && path.starts_with(&self.roots[idx].0) {
|
||||
self.roots[idx].1
|
||||
} else {
|
||||
self.len() - 1
|
||||
|
|
Loading…
Reference in a new issue