Skip to content

Commit

Permalink
Disable new clippy lint by uncommenting debug_assert_eq
Browse files Browse the repository at this point in the history
Clippy was complaining that _i from the .enumerate() was unused. I had
commented out the debug_assert after working through some bugs, but
wanted to leave it in there to call out that there's an important
invariant.
  • Loading branch information
Notgnoshi committed Jan 1, 2024
1 parent 965c213 commit 5aa152a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generative/triangulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl Triangulation {
// NOTE: It's important that the _node_index is the same as the index into the
// self.points array!
let _node_index = graph.add_node(point);
// debug_assert_eq!(_node_index.index(), _i);
debug_assert_eq!(_node_index.index(), _i);
}

// Add the hull edges
Expand Down Expand Up @@ -137,7 +137,7 @@ impl Triangulation {
// Add the nodes
for (_i, node) in digraph.raw_nodes().iter().enumerate() {
let _node_index = graph.add_node(node.weight);
// debug_assert_eq!(_i, _node_index.index());
debug_assert_eq!(_i, _node_index.index());
}

// Add the edges. Use update_edge() to avoid duplicates
Expand Down

0 comments on commit 5aa152a

Please sign in to comment.