From 2aa4c72a009dd14be444fc5856dbbcd0d4d4de4b Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 14 Nov 2026 14:05:39 +0100 Subject: [PATCH] Fix Clippy range-loop warning in crop alignment test --- crates/midra-layout/src/gui.rs | 4 ++-- docs/midralayout/changelog.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/midra-layout/src/gui.rs b/crates/midra-layout/src/gui.rs index 2da2e9c..a141533 100644 --- a/crates/midra-layout/src/gui.rs +++ b/crates/midra-layout/src/gui.rs @@ -6795,9 +6795,9 @@ mod tests { x.map_or(30.0, |v| v * mapping.offset_limits[0]), y.map_or(-20.0, |v| v * mapping.offset_limits[1]), ]; - for axis in 0..2 { + for (actual_offset, expected_offset) in actual.offset.iter().zip(expected) { assert!( - (actual.offset[axis] - expected[axis]).abs() < 1e-7, + (actual_offset - expected_offset).abs() < 1e-7, "button {index}" ); } diff --git a/docs/midralayout/changelog.md b/docs/midralayout/changelog.md index e6ca1de..904fb78 100644 --- a/docs/midralayout/changelog.md +++ b/docs/midralayout/changelog.md @@ -4,6 +4,8 @@ ## Unreleased +- Fix the crop-alignment regression test’s Clippy range-loop warning so CI passes with warnings denied; retain both offset assertions. + - Rename the positioning toggle to “Use a different measure point”. - Keep the example presentation visible for every output format, adapting its title, grid, tagline and screen labels to the new dimensions.