mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 18:26:19 +00:00
internal: fix panic in view_crate_graph
This commit is contained in:
parent
6ca780700d
commit
069de21793
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use dot::{Id, LabelText};
|
||||
use ide_db::base_db::salsa::plumbing::AsId;
|
||||
use ide_db::{
|
||||
FxHashMap, RootDatabase,
|
||||
base_db::{
|
||||
|
|
@ -78,7 +79,8 @@ impl<'a> dot::Labeller<'a, Crate, Edge<'a>> for DotCrateGraph<'_> {
|
|||
}
|
||||
|
||||
fn node_id(&'a self, n: &Crate) -> Id<'a> {
|
||||
Id::new(format!("_{:?}", n)).unwrap()
|
||||
let id = n.as_id().as_u32();
|
||||
Id::new(format!("_{:?}", id)).unwrap()
|
||||
}
|
||||
|
||||
fn node_shape(&'a self, _node: &Crate) -> Option<LabelText<'a>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue