From 435c422963ef16a42070356e350c89670979e2d0 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 11 May 2021 16:36:00 +0200 Subject: Distinguish crates with identical name --- crates/ide/src/view_crate_graph.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide') 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 { fn node_id(&'a self, n: &CrateId) -> Id<'a> { let name = self.0[*n].display_name.as_ref().map_or("_missing_name_", |name| &*name); - Id::new(name).unwrap() + Id::new(format!("{}_{}", name, n.0)).unwrap() } } -- cgit v1.2.3