From 3a42c63b5be88bf8ec06b14ce272eb198bfcb0f9 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 23 Aug 2026 13:24:48 +0200 Subject: [PATCH] Format the refine tests the way the gate asks for it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `cargo fmt --check` is a required step and the mask-refine work landed with a test body it disagrees with. Whitespace only — kept as its own commit so it can be skipped wholesale rather than read for a change that matters. Co-Authored-By: Claude Opus 5 (1M context) --- ui/dr-ui/src/develop.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ui/dr-ui/src/develop.rs b/ui/dr-ui/src/develop.rs index b19f490..3825465 100644 --- a/ui/dr-ui/src/develop.rs +++ b/ui/dr-ui/src/develop.rs @@ -3046,8 +3046,9 @@ mod tests { fn a_slider_moved_with_two_layers_selected_moves_both() { let Some(ctx) = headless() else { return }; let rgba: Vec = (0..8 * 8).flat_map(|_| [128u8, 128, 128, 255]).collect(); - let mut session = DevelopSession::open_rgb(&ctx, &rgba, 8, 8, dr_types::Orientation::NORMAL) - .expect("session"); + let mut session = + DevelopSession::open_rgb(&ctx, &rgba, 8, 8, dr_types::Orientation::NORMAL) + .expect("session"); let a = session.add_gradient_mask(true).expect("first gradient"); let b = session.add_gradient_mask(false).expect("second gradient"); @@ -3101,7 +3102,10 @@ mod tests { // Two rows, black then white: the exact midpoint reads as grey. let mask = [0.0f32, 0.0, 1.0, 1.0]; let v = bilinear_sample(&mask, 2, 2, 0.5, 0.5); - assert!((v - 0.5).abs() < 1e-6, "expected the midpoint grey, got {v}"); + assert!( + (v - 0.5).abs() < 1e-6, + "expected the midpoint grey, got {v}" + ); } /// A control-click twice — once to add, once to remove — is a no-op on @@ -3111,8 +3115,9 @@ mod tests { fn toggling_a_layer_twice_returns_to_the_starting_selection() { let Some(ctx) = headless() else { return }; let rgba: Vec = (0..8 * 8).flat_map(|_| [128u8, 128, 128, 255]).collect(); - let mut session = DevelopSession::open_rgb(&ctx, &rgba, 8, 8, dr_types::Orientation::NORMAL) - .expect("session"); + let mut session = + DevelopSession::open_rgb(&ctx, &rgba, 8, 8, dr_types::Orientation::NORMAL) + .expect("session"); let a = session.add_gradient_mask(true).expect("gradient"); assert_eq!(session.active_masks(), [a.clone()].as_slice());