From 37ee4f5a204c2b9e7cbdfba37da79cb6af7425b4 Mon Sep 17 00:00:00 2001 From: Persi <69083413+persi-man@users.noreply.github.com> Date: Tue, 13 Oct 2026 03:26:45 +0200 Subject: [PATCH] Simplify the raster stale-block filter for clippy's nonminimal_bool (#4314) Clippy 1.96 flags the `retain` predicate that strips stale content blocks from pixel layers on PSD export (`clippy::nonminimal_bool`), which breaks `cargo clippy -- -D warnings` on current stable. Rewrite it as a single negated disjunction. The four terms, their order and the short-circuiting are unchanged, so the same blocks are kept and dropped. --- crates/io/src/psd_export.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/io/src/psd_export.rs b/crates/io/src/psd_export.rs index 38db080873..a17e783366 100644 --- a/crates/io/src/psd_export.rs +++ b/crates/io/src/psd_export.rs @@ -608,7 +608,7 @@ impl Ex { // pixel layers, so it stays. A vector mask (`vmsk`/`vsms`, `vogk`) stays. LayerContent::Raster(_) => { let masked = l.vector_mask.is_some(); - raw.retain(|(k, _)| !RASTER_STALE_KEYS.contains(&k) && !adjust_map::ADJUSTMENT_KEYS.contains(&k) && k != b"CgEd" && !(k == b"vstk" && masked)); + raw.retain(|(k, _)| !(RASTER_STALE_KEYS.contains(&k) || adjust_map::ADJUSTMENT_KEYS.contains(&k) || k == b"CgEd" || (k == b"vstk" && masked))); } LayerContent::Group(_) => {} }