Unnamed repository; edit this file 'description' to name the repository.
Fix overlap deduping infinite loop
Fixes: 14276
Dan Johnson 2023-03-11
parent 9fca0a4 · commit 2691143
-rw-r--r--crates/rust-analyzer/src/reload.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index fca242d91f..28d37f5685 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -527,7 +527,7 @@ impl ProjectFolders {
// maps include paths to indices of the corresponding root
let mut include_to_idx = FxHashMap::default();
// Find and note down the indices of overlapping roots
- for (idx, root) in roots.iter().filter(|it| !it.include.is_empty()).enumerate() {
+ for (idx, root) in roots.iter().enumerate().filter(|(_, it)| !it.include.is_empty()) {
for include in &root.include {
match include_to_idx.entry(include) {
Entry::Occupied(e) => {