From 55564744b2b07cb2ec396569883efd7b575c829f Mon Sep 17 00:00:00 2001 From: Zachary Harrold Date: Sat, 22 Mar 2025 23:27:14 +1100 Subject: [PATCH] Ensure `dds` enables `bevy_core_pipeline/dds` in `bevy_anti_aliasing` (#18484) - Compile failure with `bevy_anti_aliasing` due to `dds` feature not enabling `bevy_core_pipeline/dds`, causing a public API desync. - Ensured feature is enabled - CI --- crates/bevy_image/src/image.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/bevy_image/src/image.rs b/crates/bevy_image/src/image.rs index da2609028f..9d1c9b166a 100644 --- a/crates/bevy_image/src/image.rs +++ b/crates/bevy_image/src/image.rs @@ -931,13 +931,9 @@ impl Image { #[cfg(all(debug_assertions, feature = "dds"))] name: String, buffer: &[u8], image_type: ImageType, - #[expect( - clippy::allow_attributes, - reason = "`unused_variables` may not always lint" - )] - #[allow( - unused_variables, - reason = "`supported_compressed_formats` is needed where the image format is `Basis`, `Dds`, or `Ktx2`; if these are disabled, then `supported_compressed_formats` is unused." + #[cfg_attr( + not(any(feature = "basis-universal", feature = "dds", feature = "ktx2")), + expect(unused_variables, reason = "only used with certain features") )] supported_compressed_formats: CompressedImageFormats, is_srgb: bool,