mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Use Index
for CrateGraph
This commit is contained in:
parent
57c27f9139
commit
0320ebdd10
9 changed files with 24 additions and 23 deletions
|
@ -121,7 +121,7 @@ fn definition_owner_name(db: &RootDatabase, def: &Definition) -> Option<String>
|
|||
|
||||
fn determine_mod_path(db: &RootDatabase, def: &Definition) -> Option<String> {
|
||||
let mod_path = def.module(db).map(|module| {
|
||||
once(db.crate_graph().crate_data(&module.krate().into()).display_name.clone())
|
||||
once(db.crate_graph()[module.krate().into()].display_name.clone())
|
||||
.chain(
|
||||
module
|
||||
.path_to_root(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue