Skip to content

Commit 9700a89

Browse files
committed
refactor(tree): Be more specific edges is filtered
1 parent 606cd71 commit 9700a89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cargo/ops/tree/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<'a> Graph<'a> {
131131
}
132132

133133
/// Returns a list of nodes the given node index points to for the given kind.
134-
pub fn edges(&self, from: usize, kind: &EdgeKind) -> Vec<Edge> {
134+
pub fn edges_of_kind(&self, from: usize, kind: &EdgeKind) -> Vec<Edge> {
135135
let edges = self.edges[from].of_kind(kind);
136136
// Created a sorted list for consistent output.
137137
let mut edges = edges.to_owned();

src/cargo/ops/tree/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ fn print_dependencies<'a>(
383383
print_stack: &mut Vec<usize>,
384384
kind: &EdgeKind,
385385
) {
386-
let deps = graph.edges(node_index, kind);
386+
let deps = graph.edges_of_kind(node_index, kind);
387387
if deps.is_empty() {
388388
return;
389389
}

0 commit comments

Comments
 (0)