Restructure symbol queries

This commit is contained in:
Lukas Wirth 2023-04-18 15:57:49 +02:00
parent 9c408970ea
commit e7285507f6
3 changed files with 57 additions and 44 deletions

View file

@ -115,7 +115,8 @@ fn find_items<'a>(
});
// Query the local crate using the symbol index.
let local_results = symbol_index::crate_symbols(db, krate, local_query)
let local_results = local_query
.search(&symbol_index::crate_symbols(db, krate))
.into_iter()
.filter_map(move |local_candidate| get_name_definition(sema, &local_candidate))
.filter_map(|name_definition_to_import| match name_definition_to_import {