Skip to content

Commit a6e98b8

Browse files
committed
fix: constrain to max 1 edge between each pair of nodes
1 parent 33d7e20 commit a6e98b8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/core/item/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::{slice, iter};
77
use std::rc::Rc;
88

99
use rustc_ast::{ptr, ast};
10-
use crate::itertools::Itertools;
1110

1211
use crate::module::path::ModulePath;
1312

src/core/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ impl<'a> GraphWalk<'a, ItemState<'a>, Segment<'a>> for ListItem<'a> {
105105
.collect::<Vec<Vec<Segment<'a>>>>()
106106
.concat()
107107
.into_iter()
108-
.unique()
108+
.unique_by(|s| {
109+
(s.left.node.as_name().unwrap_or(&rustc_span::symbol::Symbol::intern("")).to_string(),
110+
s.right.node.as_name().unwrap_or(&rustc_span::symbol::Symbol::intern("")).to_string())
111+
})
109112
.collect::<Vec<Segment<'a>>>())
110113
}
111114

0 commit comments

Comments
 (0)