From ea37bf8bd9b5bb934bbb0d6d962d7240e9b1f208 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 03:30:26 +0100 Subject: [PATCH] #9077: drop the map_pixels wrapper the main merge left unused Main's Equalize change (58d11d91ea) moved Equalize to map_pixels_in, and this PR moves Average off map_pixels, so after merging main the wrapper had no caller and clippy -D warnings failed on dead code. Fold its doc into map_pixels_in. Co-Authored-By: ArjenS-LA Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/extra_cmds.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/engine/src/cmd/extra_cmds.rs b/crates/engine/src/cmd/extra_cmds.rs index ca6ed6b386..275e344647 100644 --- a/crates/engine/src/cmd/extra_cmds.rs +++ b/crates/engine/src/cmd/extra_cmds.rs @@ -74,13 +74,9 @@ pub(crate) fn step_key(s: &Session, what: &str) -> String { /// area, the pixels, and the selection coverage per pixel; results are blended back by coverage, /// and transparency stays locked when the layer locks it. When `p` targets an alpha channel, the /// Quick Mask or the layer mask (`Session::execute` fills that in from the Channels panel), that -/// grayscale surface is rewritten instead, as the core filters do (#935). -fn map_pixels(s: &mut Session, label: &str, p: &Value, f: impl FnOnce(Rect, &mut [[f32; 4]], &[f32])) -> Result { - map_pixels_in(s, label, p, false, f) -} - -/// [`map_pixels`], or with `whole` the whole canvas: `f` still gets the selection coverage, and -/// every pixel takes its result in full. +/// grayscale surface is rewritten instead, as the core filters do (#935). With `whole` the whole +/// canvas is rewritten: `f` still gets the selection coverage, and every pixel takes its result +/// in full. fn map_pixels_in(s: &mut Session, label: &str, p: &Value, whole: bool, f: impl FnOnce(Rect, &mut [[f32; 4]], &[f32])) -> Result { let id = layer_param(s, p)?; let channel = crate::channel_cmds::target_of(p) != crate::channel_cmds::Target::Pixels;