Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/symbol_index.rs')
-rw-r--r--crates/ide-db/src/symbol_index.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ide-db/src/symbol_index.rs b/crates/ide-db/src/symbol_index.rs
index c2e95ca860..7774b0834d 100644
--- a/crates/ide-db/src/symbol_index.rs
+++ b/crates/ide-db/src/symbol_index.rs
@@ -329,7 +329,7 @@ impl Query {
for index in indices.iter() {
op = op.add(index.map.search(&automaton));
}
- self.search_maps(&indices, op.union(), cb)
+ self.search_maps(indices, op.union(), cb)
}
SearchMode::Fuzzy => {
let automaton = fst::automaton::Subsequence::new(&self.lowercased);
@@ -337,7 +337,7 @@ impl Query {
for index in indices.iter() {
op = op.add(index.map.search(&automaton));
}
- self.search_maps(&indices, op.union(), cb)
+ self.search_maps(indices, op.union(), cb)
}
SearchMode::Prefix => {
let automaton = fst::automaton::Str::new(&self.lowercased).starts_with();
@@ -345,7 +345,7 @@ impl Query {
for index in indices.iter() {
op = op.add(index.map.search(&automaton));
}
- self.search_maps(&indices, op.union(), cb)
+ self.search_maps(indices, op.union(), cb)
}
}
}
@@ -383,10 +383,10 @@ impl Query {
}
fn matches_assoc_mode(&self, is_trait_assoc_item: bool) -> bool {
- match (is_trait_assoc_item, self.assoc_mode) {
- (true, AssocSearchMode::Exclude) | (false, AssocSearchMode::AssocItemsOnly) => false,
- _ => true,
- }
+ !matches!(
+ (is_trait_assoc_item, self.assoc_mode),
+ (true, AssocSearchMode::Exclude) | (false, AssocSearchMode::AssocItemsOnly)
+ )
}
}