Skip to content

Commit 5749c42

Browse files
bors[bot]matklad
andauthored
Merge #5155
5155: FileSetConfig works with empty set of roots r=matklad a=matklad Closes #5139 bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents b1a2d01 + e336a96 commit 5749c42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/vfs/src/file_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl FileSetConfig {
6969
Ok(it) => it,
7070
Err(it) => it.saturating_sub(1),
7171
};
72-
if path.starts_with(&self.roots[idx].0) {
72+
if !self.roots.is_empty() && path.starts_with(&self.roots[idx].0) {
7373
self.roots[idx].1
7474
} else {
7575
self.len() - 1

0 commit comments

Comments
 (0)