mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Introduce ToNav trait
This commit is contained in:
parent
2ccc45979c
commit
4deba88c33
7 changed files with 200 additions and 177 deletions
|
@ -56,7 +56,7 @@ use ra_db::{
|
|||
};
|
||||
use ra_syntax::{SourceFile, TextRange, TextUnit};
|
||||
|
||||
use crate::{db::LineIndexDatabase, symbol_index::FileSymbol};
|
||||
use crate::{db::LineIndexDatabase, display::ToNav, symbol_index::FileSymbol};
|
||||
|
||||
pub use crate::{
|
||||
assists::{Assist, AssistId},
|
||||
|
@ -351,7 +351,7 @@ impl Analysis {
|
|||
self.with_db(|db| {
|
||||
symbol_index::world_symbols(db, query)
|
||||
.into_iter()
|
||||
.map(|s| NavigationTarget::from_symbol(db, s))
|
||||
.map(|s| s.to_nav(db))
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue