diff options
author | Kirill Bulatov <[email protected]> | 2020-03-16 09:47:52 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-03-16 09:47:52 +0000 |
commit | 059ed25a3eea97f370c190803318d5cb7885e1a9 (patch) | |
tree | 7c4b36fc3623683380caf5bd6487e3f8aa57774a /crates/ra_hir_def/src | |
parent | 6bc226fa1918b8025b19cdf9d1f972f029e6a899 (diff) |
Fix crate display name dashes
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 81eac52ad..87992854a 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -177,8 +177,13 @@ pub struct ModuleData { | |||
177 | 177 | ||
178 | impl CrateDefMap { | 178 | impl CrateDefMap { |
179 | pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { | 179 | pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { |
180 | let _p = profile("crate_def_map_query") | 180 | let _p = profile("crate_def_map_query").detail(|| { |
181 | .detail(|| db.crate_graph()[krate].display_name.clone().unwrap_or_default()); | 181 | db.crate_graph()[krate] |
182 | .display_name | ||
183 | .as_ref() | ||
184 | .map(|name| name.get_name()) | ||
185 | .unwrap_or_default() | ||
186 | }); | ||
182 | let def_map = { | 187 | let def_map = { |
183 | let edition = db.crate_graph()[krate].edition; | 188 | let edition = db.crate_graph()[krate].edition; |
184 | let mut modules: Arena<LocalModuleId, ModuleData> = Arena::default(); | 189 | let mut modules: Arena<LocalModuleId, ModuleData> = Arena::default(); |