aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-05-11 15:36:00 +0100
committerJonas Schievink <[email protected]>2021-05-11 15:36:00 +0100
commit435c422963ef16a42070356e350c89670979e2d0 (patch)
treed077ad4f9a61879db31b1c42d420515a9a2bac60 /crates
parenta85a2c4d151d9d2e8fb016d76aad99a6ca88bc75 (diff)
Distinguish crates with identical name
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/view_crate_graph.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/view_crate_graph.rs b/crates/ide/src/view_crate_graph.rs
index 4da4ce2b3..8aa598170 100644
--- a/crates/ide/src/view_crate_graph.rs
+++ b/crates/ide/src/view_crate_graph.rs
@@ -76,6 +76,6 @@ impl<'a> dot::Labeller<'a, CrateId, Edge<'a>> for DotCrateGraph {
76 76
77 fn node_id(&'a self, n: &CrateId) -> Id<'a> { 77 fn node_id(&'a self, n: &CrateId) -> Id<'a> {
78 let name = self.0[*n].display_name.as_ref().map_or("_missing_name_", |name| &*name); 78 let name = self.0[*n].display_name.as_ref().map_or("_missing_name_", |name| &*name);
79 Id::new(name).unwrap() 79 Id::new(format!("{}_{}", name, n.0)).unwrap()
80 } 80 }
81} 81}