diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-16 10:33:13 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-16 10:33:13 +0000 |
commit | 2eb1677b12f15a377111e877f6a09e1a1550c8be (patch) | |
tree | 65212bd2a271776683682c76c7f033abe83a907d /crates/ra_hir_def/src | |
parent | 200c275c2e9955371e61f6ad7684084655df46fc (diff) | |
parent | 92fd430dab8cd0c7a476ccc5db87607f3f0f00a2 (diff) |
Merge #3603
3603: Fix crate display name dashes r=matklad a=SomeoneToIgnore
A follow-up of https://github.com/rust-analyzer/rust-analyzer/pull/3602#discussion_r392733525
Co-authored-by: Kirill Bulatov <[email protected]>
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..03515309e 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(ToString::to_string) | ||
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(); |