Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/view_crate_graph.rs')
| -rw-r--r-- | crates/ide/src/view_crate_graph.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ide/src/view_crate_graph.rs b/crates/ide/src/view_crate_graph.rs index 17a1e385b7..8c84461f65 100644 --- a/crates/ide/src/view_crate_graph.rs +++ b/crates/ide/src/view_crate_graph.rs @@ -1,11 +1,9 @@ -use std::sync::Arc; - use dot::{Id, LabelText}; use ide_db::{ base_db::{CrateGraph, CrateId, Dependency, SourceDatabase, SourceDatabaseExt}, - RootDatabase, + FxHashSet, RootDatabase, }; -use stdx::hash::NoHashHashSet; +use triomphe::Arc; // Feature: View Crate Graph // @@ -42,7 +40,7 @@ pub(crate) fn view_crate_graph(db: &RootDatabase, full: bool) -> Result<String, struct DotCrateGraph { graph: Arc<CrateGraph>, - crates_to_render: NoHashHashSet<CrateId>, + crates_to_render: FxHashSet<CrateId>, } type Edge<'a> = (CrateId, &'a Dependency); @@ -80,7 +78,7 @@ impl<'a> dot::Labeller<'a, CrateId, Edge<'a>> for DotCrateGraph { } fn node_id(&'a self, n: &CrateId) -> Id<'a> { - Id::new(format!("_{}", n.0)).unwrap() + Id::new(format!("_{}", u32::from(n.into_raw()))).unwrap() } fn node_shape(&'a self, _node: &CrateId) -> Option<LabelText<'a>> { |