Distinguish crates with identical name

This commit is contained in:
Jonas Schievink 2021-05-11 16:36:00 +02:00
parent a85a2c4d15
commit 435c422963

View file

@ -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()
}
}