diff --git a/crates/path/src/feather.rs b/crates/path/src/feather.rs index 2d744566e..47a4bda7e 100644 --- a/crates/path/src/feather.rs +++ b/crates/path/src/feather.rs @@ -73,7 +73,7 @@ impl Flat { /// Keep every other point (and the last), with their arc lengths. fn thin(&mut self) { let n = self.pts.len(); - let keep = |i: usize| i % 2 == 0 || i + 1 == n; + let keep = |i: usize| i.is_multiple_of(2) || i + 1 == n; let mut i = 0; self.pts.retain(|_| { i += 1;