clippy manual_is_multiple_of

This commit is contained in:
Dylan M. Taylor
2026-11-03 11:26:27 +00:00
parent fd10a4f326
commit 36a5e00801
+1 -1
View File
@@ -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;