diff options
author | Jonas Schievink <[email protected]> | 2021-05-11 15:36:00 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-05-11 15:36:00 +0100 |
commit | 435c422963ef16a42070356e350c89670979e2d0 (patch) | |
tree | d077ad4f9a61879db31b1c42d420515a9a2bac60 | |
parent | a85a2c4d151d9d2e8fb016d76aad99a6ca88bc75 (diff) |
Distinguish crates with identical name
-rw-r--r-- | crates/ide/src/view_crate_graph.rs | 2 |
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 | } |