Skip to content

Commit

Permalink
followed clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
morgane.baizeau committed Apr 28, 2024
1 parent e5a9d73 commit a246916
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/morphology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,8 @@ impl Mask {
Self {
elements: (0..image.width() as i16)
.cartesian_product(0..(image.height() as i16))
.filter_map(|(x, y)| {
(image.get_pixel(x as u32, y as u32).0[0] != 0)
.then(|| (x - center_x as i16, y - center_y as i16))
})
.filter(|(x, y)| image.get_pixel(*x as u32, *y as u32).0[0] != 0)
.map(|(x, y)| (x - center_x as i16, y - center_y as i16))
.collect(),
}
}
Expand Down

0 comments on commit a246916

Please sign in to comment.