From d5b092b6ed0906e4a8f714af853fc0899b163c73 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 02:48:01 +0000 Subject: [PATCH] craft-heif: keep #[cfg(test)] on the test modules so clippy treats them as tests #[cfg(all(test, feature = "decode"))] hid the test cfg from clippy's allow-unwrap-in-tests, so the helpers in tests_icc.rs and tests_synthetic.rs failed all-targets clippy. The modules now carry #[cfg(test)] and #[cfg(feature = "decode")] as two attributes. --- crates/heif/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/heif/src/lib.rs b/crates/heif/src/lib.rs index 8f1a9de69..ece2d9dc3 100644 --- a/crates/heif/src/lib.rs +++ b/crates/heif/src/lib.rs @@ -650,12 +650,15 @@ fn metadata(ctx: &Context<'_>) -> (Option>, Option) { (exif, xmp.map(|x| x.trim_end_matches('\0').to_string())) } -#[cfg(all(test, feature = "decode"))] +#[cfg(test)] +#[cfg(feature = "decode")] mod tests_icc; -#[cfg(all(test, feature = "decode"))] +#[cfg(test)] +#[cfg(feature = "decode")] mod tests_synthetic; -#[cfg(all(test, feature = "decode"))] +#[cfg(test)] +#[cfg(feature = "decode")] mod tests { use super::*;