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.
This commit is contained in:
Dylan M. Taylor
2026-11-12 02:48:01 +00:00
parent 1710de574b
commit d5b092b6ed
+6 -3
View File
@@ -650,12 +650,15 @@ fn metadata(ctx: &Context<'_>) -> (Option<Vec<u8>>, Option<String>) {
(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::*;