diff --git a/crates/bevy_ecs/src/change_detection.rs b/crates/bevy_ecs/src/change_detection.rs index 767134fdc6..fdb5d496c5 100644 --- a/crates/bevy_ecs/src/change_detection.rs +++ b/crates/bevy_ecs/src/change_detection.rs @@ -1847,8 +1847,7 @@ mod tests { let mut new = value.map_unchanged(|ptr| { // SAFETY: The underlying type of `ptr` matches `reflect_from_ptr`. - let value = unsafe { reflect_from_ptr.as_reflect_mut(ptr) }; - value + unsafe { reflect_from_ptr.as_reflect_mut(ptr) } }); assert!(!new.is_changed()); diff --git a/crates/bevy_render/src/batching/gpu_preprocessing.rs b/crates/bevy_render/src/batching/gpu_preprocessing.rs index 6032ff436e..ea5970431a 100644 --- a/crates/bevy_render/src/batching/gpu_preprocessing.rs +++ b/crates/bevy_render/src/batching/gpu_preprocessing.rs @@ -392,6 +392,10 @@ where } /// The buffer of GPU preprocessing work items for a single view. +#[expect( + clippy::large_enum_variant, + reason = "See https://github.com/bevyengine/bevy/issues/19220" +)] pub enum PreprocessWorkItemBuffers { /// The work items we use if we aren't using indirect drawing. /// diff --git a/crates/bevy_render/src/mesh/allocator.rs b/crates/bevy_render/src/mesh/allocator.rs index 113369cea1..eb2d4de626 100644 --- a/crates/bevy_render/src/mesh/allocator.rs +++ b/crates/bevy_render/src/mesh/allocator.rs @@ -158,6 +158,10 @@ pub struct MeshBufferSlice<'a> { pub struct SlabId(pub NonMaxU32); /// Data for a single slab. +#[expect( + clippy::large_enum_variant, + reason = "See https://github.com/bevyengine/bevy/issues/19220" +)] enum Slab { /// A slab that can contain multiple objects. General(GeneralSlab), diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs index be22c83f98..d9fcd19d24 100644 --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -80,6 +80,10 @@ pub struct CachedPipeline { } /// State of a cached pipeline inserted into a [`PipelineCache`]. +#[expect( + clippy::large_enum_variant, + reason = "See https://github.com/bevyengine/bevy/issues/19220" +)] #[derive(Debug)] pub enum CachedPipelineState { /// The pipeline GPU object is queued for creation. @@ -189,6 +193,10 @@ impl ShaderCache { } } + #[expect( + clippy::result_large_err, + reason = "See https://github.com/bevyengine/bevy/issues/19220" + )] fn add_import_to_composer( composer: &mut naga_oil::compose::Composer, import_path_shaders: &HashMap>, @@ -216,6 +224,10 @@ impl ShaderCache { Ok(()) } + #[expect( + clippy::result_large_err, + reason = "See https://github.com/bevyengine/bevy/issues/19220" + )] fn get( &mut self, render_device: &RenderDevice, @@ -1090,6 +1102,10 @@ fn create_pipeline_task( target_os = "macos", not(feature = "multi_threaded") ))] +#[expect( + clippy::large_enum_variant, + reason = "See https://github.com/bevyengine/bevy/issues/19220" +)] fn create_pipeline_task( task: impl Future> + Send + 'static, _sync: bool, @@ -1101,6 +1117,10 @@ fn create_pipeline_task( } /// Type of error returned by a [`PipelineCache`] when the creation of a GPU pipeline object failed. +#[expect( + clippy::large_enum_variant, + reason = "See https://github.com/bevyengine/bevy/issues/19220" +)] #[derive(Error, Debug)] pub enum PipelineCacheError { #[error( diff --git a/crates/bevy_render/src/settings.rs b/crates/bevy_render/src/settings.rs index d4eb9b7680..ab50fc81b1 100644 --- a/crates/bevy_render/src/settings.rs +++ b/crates/bevy_render/src/settings.rs @@ -152,6 +152,10 @@ pub struct RenderResources( ); /// An enum describing how the renderer will initialize resources. This is used when creating the [`RenderPlugin`](crate::RenderPlugin). +#[expect( + clippy::large_enum_variant, + reason = "See https://github.com/bevyengine/bevy/issues/19220" +)] pub enum RenderCreation { /// Allows renderer resource initialization to happen outside of the rendering plugin. Manual(RenderResources), diff --git a/crates/bevy_text/src/pipeline.rs b/crates/bevy_text/src/pipeline.rs index ebaa10b12b..2a47866f76 100644 --- a/crates/bevy_text/src/pipeline.rs +++ b/crates/bevy_text/src/pipeline.rs @@ -532,7 +532,7 @@ fn get_attrs<'a>( face_info: &'a FontFaceInfo, scale_factor: f64, ) -> Attrs<'a> { - let attrs = Attrs::new() + Attrs::new() .metadata(span_index) .family(Family::Name(&face_info.family_name)) .stretch(face_info.stretch) @@ -545,8 +545,7 @@ fn get_attrs<'a>( } .scale(scale_factor as f32), ) - .color(cosmic_text::Color(color.to_linear().as_u32())); - attrs + .color(cosmic_text::Color(color.to_linear().as_u32())) } /// Calculate the size of the text area for the given buffer.