diff --git a/crates/engine/src/cmd/adjust_cmds/tests.rs b/crates/engine/src/cmd/adjust_cmds/tests.rs index cf6be4310e..17397608a9 100644 --- a/crates/engine/src/cmd/adjust_cmds/tests.rs +++ b/crates/engine/src/cmd/adjust_cmds/tests.rs @@ -762,7 +762,15 @@ fn replace_color_adds_and_subtracts_samples_as_color_range_does() { // Red on the left (x < 16), blue in the middle, green on the right (x ≥ 32). let (red, blue, green) = ([0.85, 0.1, 0.1, 1.0], [0.1, 0.15, 0.85, 1.0], [0.1, 0.8, 0.15, 1.0]); let mut s = session(8, "rgb"); - paint(&mut s, |x, _| if x < 16 { red } else if x < 32 { blue } else { green }); + paint(&mut s, |x, _| { + if x < 16 { + red + } else if x < 32 { + blue + } else { + green + } + }); let before = (rgba(&s, 4, 16), rgba(&s, 24, 16), rgba(&s, 40, 16)); let shift = |extra: Value| { let mut p = json!({"fuzziness": 40, "hue": 120, "saturation": 20}); diff --git a/crates/ui-egui/src/dialogs/filter_dialog.rs b/crates/ui-egui/src/dialogs/filter_dialog.rs index 1060ad0832..e30346bb51 100644 --- a/crates/ui-egui/src/dialogs/filter_dialog.rs +++ b/crates/ui-egui/src/dialogs/filter_dialog.rs @@ -1050,9 +1050,11 @@ pub fn body(ui: &mut egui::Ui, f: &mut Map) { // puts it away. let armed = f.get(COLOR_EYEDROPPER).and_then(Value::as_bool).unwrap_or(false); let tool = f.get("__tool").and_then(Value::as_str).unwrap_or("sample").to_string(); - for (id, badge, label) in - [("subtract", "−", tl!("Subtract from Sample")), ("add", "+", tl!("Add to Sample")), ("sample", "", tl!("Pick Color From Image"))] - { + for (id, badge, label) in [ + ("subtract", "−", tl!("Subtract from Sample")), + ("add", "+", tl!("Add to Sample")), + ("sample", "", tl!("Pick Color From Image")), + ] { let on = armed && tool == id; if crate::color_range_ui::eyedropper(ui, badge, on, label).clicked() { f.insert(COLOR_EYEDROPPER.into(), json!(!on));