Fix inconsistent local var name in test function

This commit is contained in:
2026-05-13 10:58:47 +02:00
parent 340fde2133
commit 384dca2d20
+5 -5
View File
@@ -473,21 +473,21 @@ macro_rules! graph_topology_tests {
"unexpected incidence count for vertex {:?}",
vertices[i]
);
let mut remaining = incidences[i].clone();
let mut expected = incidences[i].clone();
for incidence in graph.incidences(vertices[i]) {
let pos = remaining
let pos = expected
.iter()
.position(|(v, e)| *v == incidence.0 && *e == incidence.1)
.expect(&format!(
"unexpected incidence {incidence:?} of vertex {:?} from the iterator",
vertices[i]
));
remaining.swap_remove(pos);
expected.swap_remove(pos);
}
assert!(
remaining.is_empty(),
expected.is_empty(),
"expected incidences {:?} of vertex {:?} were not matched by the iterator",
remaining,
expected,
vertices[i]
);
}