Skip to content

Commit

Permalink
style: use Iterator::inspect() when the value does not change
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Sep 5, 2024
1 parent fa148d5 commit 91cdea8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,8 @@ impl Iterator for GridIterator<'_> {
self.grid
.exclusions
.get_index(self.x)
.map(|v| {
.inspect(|_| {
self.x += 1;
v
})
.copied()
}
Expand Down

0 comments on commit 91cdea8

Please sign in to comment.