diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs index d640581c96..de4f976a35 100644 --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -124,7 +124,7 @@ pub struct BundleInfo { impl BundleInfo { /// # Safety /// table row must exist, entity must be valid - #[allow(clippy::clippy::too_many_arguments)] + #[allow(clippy::too_many_arguments)] #[inline] pub(crate) unsafe fn write_components( &self, diff --git a/crates/bevy_ecs/src/system/into_system.rs b/crates/bevy_ecs/src/system/into_system.rs index 648bb5edd0..97f3e0f62f 100644 --- a/crates/bevy_ecs/src/system/into_system.rs +++ b/crates/bevy_ecs/src/system/into_system.rs @@ -119,6 +119,7 @@ where system_state: SystemState, config: Option<::Config>, // NOTE: PhantomData T> gives this safe Send/Sync impls + #[allow(clippy::type_complexity)] marker: PhantomData (In, Out, Marker)>, } diff --git a/crates/bevy_reflect/src/type_registry.rs b/crates/bevy_reflect/src/type_registry.rs index 30c80331b4..91f888e35d 100644 --- a/crates/bevy_reflect/src/type_registry.rs +++ b/crates/bevy_reflect/src/type_registry.rs @@ -227,6 +227,7 @@ pub trait FromType { #[derive(Clone)] pub struct ReflectDeserialize { + #[allow(clippy::type_complexity)] pub func: fn( deserializer: &mut dyn erased_serde::Deserializer, ) -> Result, erased_serde::Error>, diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 80318e350e..df4074001c 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -63,6 +63,7 @@ impl Camera { } } +#[allow(clippy::type_complexity)] pub fn camera_system( mut window_resized_events: EventReader, mut window_created_events: EventReader, diff --git a/crates/bevy_render/src/mesh/mesh.rs b/crates/bevy_render/src/mesh/mesh.rs index 42043038bc..2059311a79 100644 --- a/crates/bevy_render/src/mesh/mesh.rs +++ b/crates/bevy_render/src/mesh/mesh.rs @@ -505,6 +505,7 @@ pub struct MeshResourceProviderState { mesh_entities: HashMap, MeshEntities>, } +#[allow(clippy::type_complexity)] pub fn mesh_resource_provider_system( mut state: Local, render_resource_context: Res>, diff --git a/crates/bevy_render/src/mesh/shape/capsule.rs b/crates/bevy_render/src/mesh/shape/capsule.rs index c4693adddc..aaba621cc7 100644 --- a/crates/bevy_render/src/mesh/shape/capsule.rs +++ b/crates/bevy_render/src/mesh/shape/capsule.rs @@ -52,7 +52,7 @@ impl Default for CapsuleUvProfile { } impl From for Mesh { - #[allow(clippy::clippy::needless_range_loop)] + #[allow(clippy::needless_range_loop)] fn from(capsule: Capsule) -> Self { // code adapted from https://behreajj.medium.com/making-a-capsule-mesh-via-script-in-five-3d-environments-c2214abf02db diff --git a/crates/bevy_render/src/render_graph/nodes/render_resources_node.rs b/crates/bevy_render/src/render_graph/nodes/render_resources_node.rs index efbb8ca1f8..0901a7782d 100644 --- a/crates/bevy_render/src/render_graph/nodes/render_resources_node.rs +++ b/crates/bevy_render/src/render_graph/nodes/render_resources_node.rs @@ -428,6 +428,7 @@ impl Default for RenderResourcesNodeState { } } +#[allow(clippy::type_complexity)] fn render_resources_node_system( mut state: Local>, mut entities_waiting_for_textures: Local>, @@ -610,7 +611,7 @@ impl Default for AssetRenderNodeState { } } -#[allow(clippy::too_many_arguments)] +#[allow(clippy::too_many_arguments, clippy::type_complexity)] fn asset_render_resources_node_system( mut state: Local>, mut asset_state: Local>, diff --git a/crates/bevy_render/src/wireframe/mod.rs b/crates/bevy_render/src/wireframe/mod.rs index b2ad852a47..a2862d4ee3 100644 --- a/crates/bevy_render/src/wireframe/mod.rs +++ b/crates/bevy_render/src/wireframe/mod.rs @@ -55,6 +55,7 @@ impl Default for WireframeConfig { } } +#[allow(clippy::type_complexity)] pub fn draw_wireframes_system( mut draw_context: DrawContext, msaa: Res, diff --git a/crates/bevy_sprite/src/color_material.rs b/crates/bevy_sprite/src/color_material.rs index 61c70954b8..d4070ab9b0 100644 --- a/crates/bevy_sprite/src/color_material.rs +++ b/crates/bevy_sprite/src/color_material.rs @@ -59,6 +59,7 @@ impl From> for ColorMaterial { // Temporary solution for sub-assets change handling, see https://github.com/bevyengine/bevy/issues/1161#issuecomment-780467768 // TODO: should be removed when pipelined rendering is done +#[allow(clippy::type_complexity)] pub(crate) fn material_texture_detection_system( mut texture_to_material: Local, HashSet>>>, mut material_to_texture: Local, Handle>>, diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs index 7d778a9943..890f57bbf1 100644 --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -57,6 +57,7 @@ impl Default for Text2dBundle { /// System for drawing text in a 2D scene via a 2D `OrthographicCameraBundle`. Included in the /// default `TextPlugin`. Position is determined by the `Transform`'s translation, though scale and /// rotation are ignored. +#[allow(clippy::type_complexity)] pub fn draw_text2d_system( mut context: DrawContext, msaa: Res, @@ -125,7 +126,7 @@ pub struct QueuedText2d { } /// Updates the TextGlyphs with the new computed glyphs from the layout -#[allow(clippy::too_many_arguments)] +#[allow(clippy::too_many_arguments, clippy::type_complexity)] pub fn text2d_system( mut queued_text: Local, mut textures: ResMut>, diff --git a/crates/bevy_ui/src/flex/mod.rs b/crates/bevy_ui/src/flex/mod.rs index 9163d74b33..2e1c205b1a 100644 --- a/crates/bevy_ui/src/flex/mod.rs +++ b/crates/bevy_ui/src/flex/mod.rs @@ -195,7 +195,7 @@ pub enum FlexError { StretchError(stretch::Error), } -#[allow(clippy::too_many_arguments)] +#[allow(clippy::too_many_arguments, clippy::type_complexity)] pub fn flex_node_system( windows: Res, mut scale_factor_events: EventReader, diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs index df99b53869..60b44c0653 100644 --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -39,6 +39,7 @@ pub struct State { entities_to_reset: SmallVec<[Entity; 1]>, } +#[allow(clippy::type_complexity)] pub fn ui_focus_system( mut state: Local, windows: Res, diff --git a/crates/bevy_ui/src/widget/text.rs b/crates/bevy_ui/src/widget/text.rs index e5657e71da..3e5c91c9ea 100644 --- a/crates/bevy_ui/src/widget/text.rs +++ b/crates/bevy_ui/src/widget/text.rs @@ -42,7 +42,7 @@ pub fn text_constraint(min_size: Val, size: Val, max_size: Val, scale_factor: f6 /// Computes the size of a text block and updates the TextGlyphs with the /// new computed glyphs from the layout -#[allow(clippy::too_many_arguments)] +#[allow(clippy::too_many_arguments, clippy::type_complexity)] pub fn text_system( mut queued_text: Local, mut last_scale_factor: Local, @@ -139,7 +139,7 @@ pub fn text_system( queued_text.entities = new_queue; } -#[allow(clippy::too_many_arguments)] +#[allow(clippy::too_many_arguments, clippy::type_complexity)] pub fn draw_text_system( mut context: DrawContext, msaa: Res, diff --git a/crates/bevy_wgpu/src/wgpu_type_converter.rs b/crates/bevy_wgpu/src/wgpu_type_converter.rs index d7993d0df8..6d0c0aae6d 100644 --- a/crates/bevy_wgpu/src/wgpu_type_converter.rs +++ b/crates/bevy_wgpu/src/wgpu_type_converter.rs @@ -146,7 +146,7 @@ impl WgpuFrom for wgpu::BufferUsage { impl WgpuFrom<&LoadOp> for wgpu::LoadOp { fn from(val: &LoadOp) -> Self { match val { - LoadOp::Clear(value) => wgpu::LoadOp::Clear(value.clone().wgpu_into()), + LoadOp::Clear(value) => wgpu::LoadOp::Clear((*value).wgpu_into()), LoadOp::Load => wgpu::LoadOp::Load, } } diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 978009f4e4..3ba197c05c 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -152,11 +152,10 @@ fn change_window(world: &mut World) { width: constraints.max_width, height: constraints.max_height, }; + + window.set_min_inner_size(Some(min_inner_size)); if constraints.max_width.is_finite() && constraints.max_height.is_finite() { - window.set_min_inner_size(Some(min_inner_size)); window.set_max_inner_size(Some(max_inner_size)); - } else { - window.set_min_inner_size(Some(min_inner_size)); } } }