Skip to content

Commit

Permalink
fix bug described in Issue #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Dany Doerr committed Aug 6, 2023
1 parent 3784c7e commit db5cb92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ fn collapse(
.neighbors(*v, Direction::Right)
.filter(|u| !del_subg.edge_deleted(v, u))
.collect();
for x in outgoing_edges {
for mut x in outgoing_edges {
if &x == v {
x = w;
} else if x == v.flip() {
x = w.flip()
}
if !graph.has_edge(w, x) {
graph.create_edge(Edge(w, x));
log::debug!("create edge {}{}", v2str(&w), v2str(&x));
Expand Down

0 comments on commit db5cb92

Please sign in to comment.