mirror of
https://github.com/rust-lang/rust.git
synced 2026-03-23 16:05:13 +00:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user