mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
parent
b1a2d01645
commit
e336a96998
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ impl FileSetConfig {
|
||||||
Ok(it) => it,
|
Ok(it) => it,
|
||||||
Err(it) => it.saturating_sub(1),
|
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
|
self.roots[idx].1
|
||||||
} else {
|
} else {
|
||||||
self.len() - 1
|
self.len() - 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue