From 63124081c9f31d6de31d91b28db458cc729493de Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 19 Nov 2026 13:23:42 +0100 Subject: [PATCH] RAW-NEF: simplify packed-layout eligibility Express the accepted cases as one positive condition before rejecting an unmarked strip. The truth table stays unchanged: an explicit packed mode or a measured complete-group layout is required. This removes Clippy 1.95's nonminimal_bool diagnostic. --- crates/raw/src/nef.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/raw/src/nef.rs b/crates/raw/src/nef.rs index b15320ce5..9321deb30 100644 --- a/crates/raw/src/nef.rs +++ b/crates/raw/src/nef.rs @@ -458,7 +458,7 @@ fn packed_layout(w: usize, h: usize, bits: u32, strip: u64, stated: bool) -> Opt let tight = w.checked_mul(bits as usize)?.div_ceil(8); // Unmarked data must still match a measured complete-group layout: do not guess a packing for compressed // data. An explicit packed maker mode permits a final partial group, byte-aligned independently on each row. - if !stated && !(bits == 12 && w.is_multiple_of(2) || bits == 14 && w.is_multiple_of(4)) { + if !(stated || bits == 12 && w.is_multiple_of(2) || bits == 14 && w.is_multiple_of(4)) { return None; } let padded = tight.checked_next_multiple_of(16)?;