mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Remove limit from symbol_index::Query
This commit is contained in:
parent
0af780ea3e
commit
2666349392
8 changed files with 10 additions and 29 deletions
|
@ -414,11 +414,12 @@ impl Analysis {
|
|||
}
|
||||
|
||||
/// Fuzzy searches for a symbol.
|
||||
pub fn symbol_search(&self, query: Query) -> Cancellable<Vec<NavigationTarget>> {
|
||||
pub fn symbol_search(&self, query: Query, limit: usize) -> Cancellable<Vec<NavigationTarget>> {
|
||||
self.with_db(|db| {
|
||||
symbol_index::world_symbols(db, query)
|
||||
.into_iter() // xx: should we make this a par iter?
|
||||
.filter_map(|s| s.try_to_nav(db))
|
||||
.take(limit)
|
||||
.map(UpmappingResult::call_site)
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue