aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/project_model/src/workspace.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/project_model/src/workspace.rs b/crates/project_model/src/workspace.rs
index 10e608547..786d7e5ec 100644
--- a/crates/project_model/src/workspace.rs
+++ b/crates/project_model/src/workspace.rs
@@ -507,7 +507,14 @@ fn cargo_to_crate_graph(
507 continue; 507 continue;
508 } 508 }
509 for &from in pkg_crates.get(&pkg).into_iter().flatten() { 509 for &from in pkg_crates.get(&pkg).into_iter().flatten() {
510 add_dep(&mut crate_graph, from, name.clone(), to); 510 if !crate_graph[from].dependencies.iter().any(|d| d.name == name) {
511 add_dep(&mut crate_graph, from, name.clone(), to);
512 } else {
513 // eprintln!(
514 // "Skipped {} for {:?}",
515 // &name, &crate_graph[from].display_name
516 // );
517 }
511 } 518 }
512 } 519 }
513 } 520 }