Skip to content

Commit d1f4014

Browse files
mtsrcart
andcommitted
Allows a number of clippy lints and fixes 2 (#1999)
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
1 parent cdae95b commit d1f4014

File tree

15 files changed

+19
-11
lines changed

15 files changed

+19
-11
lines changed

crates/bevy_ecs/src/bundle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub struct BundleInfo {
124124
impl BundleInfo {
125125
/// # Safety
126126
/// table row must exist, entity must be valid
127-
#[allow(clippy::clippy::too_many_arguments)]
127+
#[allow(clippy::too_many_arguments)]
128128
#[inline]
129129
pub(crate) unsafe fn write_components<T: Bundle>(
130130
&self,

crates/bevy_ecs/src/system/into_system.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ where
119119
system_state: SystemState,
120120
config: Option<<Param::Fetch as SystemParamState>::Config>,
121121
// NOTE: PhantomData<fn()-> T> gives this safe Send/Sync impls
122+
#[allow(clippy::type_complexity)]
122123
marker: PhantomData<fn() -> (In, Out, Marker)>,
123124
}
124125

crates/bevy_reflect/src/type_registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ pub trait FromType<T> {
227227

228228
#[derive(Clone)]
229229
pub struct ReflectDeserialize {
230+
#[allow(clippy::type_complexity)]
230231
pub func: fn(
231232
deserializer: &mut dyn erased_serde::Deserializer,
232233
) -> Result<Box<dyn Reflect>, erased_serde::Error>,

crates/bevy_render/src/camera/camera.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl Camera {
6363
}
6464
}
6565

66+
#[allow(clippy::type_complexity)]
6667
pub fn camera_system<T: CameraProjection + Component>(
6768
mut window_resized_events: EventReader<WindowResized>,
6869
mut window_created_events: EventReader<WindowCreated>,

crates/bevy_render/src/mesh/mesh.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ pub struct MeshResourceProviderState {
505505
mesh_entities: HashMap<Handle<Mesh>, MeshEntities>,
506506
}
507507

508+
#[allow(clippy::type_complexity)]
508509
pub fn mesh_resource_provider_system(
509510
mut state: Local<MeshResourceProviderState>,
510511
render_resource_context: Res<Box<dyn RenderResourceContext>>,

crates/bevy_render/src/mesh/shape/capsule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Default for CapsuleUvProfile {
5252
}
5353

5454
impl From<Capsule> for Mesh {
55-
#[allow(clippy::clippy::needless_range_loop)]
55+
#[allow(clippy::needless_range_loop)]
5656
fn from(capsule: Capsule) -> Self {
5757
// code adapted from https://behreajj.medium.com/making-a-capsule-mesh-via-script-in-five-3d-environments-c2214abf02db
5858

crates/bevy_render/src/render_graph/nodes/render_resources_node.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ impl<I, T: RenderResources> Default for RenderResourcesNodeState<I, T> {
428428
}
429429
}
430430

431+
#[allow(clippy::type_complexity)]
431432
fn render_resources_node_system<T: RenderResources>(
432433
mut state: Local<RenderResourcesNodeState<Entity, T>>,
433434
mut entities_waiting_for_textures: Local<Vec<Entity>>,
@@ -610,7 +611,7 @@ impl<T: Asset> Default for AssetRenderNodeState<T> {
610611
}
611612
}
612613

613-
#[allow(clippy::too_many_arguments)]
614+
#[allow(clippy::too_many_arguments, clippy::type_complexity)]
614615
fn asset_render_resources_node_system<T: RenderResources + Asset>(
615616
mut state: Local<RenderResourcesNodeState<HandleId, T>>,
616617
mut asset_state: Local<AssetRenderNodeState<T>>,

crates/bevy_render/src/wireframe/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ impl Default for WireframeConfig {
5555
}
5656
}
5757

58+
#[allow(clippy::type_complexity)]
5859
pub fn draw_wireframes_system(
5960
mut draw_context: DrawContext,
6061
msaa: Res<Msaa>,

crates/bevy_sprite/src/color_material.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ impl From<Handle<Texture>> for ColorMaterial {
5959

6060
// Temporary solution for sub-assets change handling, see https://github.com/bevyengine/bevy/issues/1161#issuecomment-780467768
6161
// TODO: should be removed when pipelined rendering is done
62+
#[allow(clippy::type_complexity)]
6263
pub(crate) fn material_texture_detection_system(
6364
mut texture_to_material: Local<HashMap<Handle<Texture>, HashSet<Handle<ColorMaterial>>>>,
6465
mut material_to_texture: Local<HashMap<Handle<ColorMaterial>, Handle<Texture>>>,

crates/bevy_text/src/text2d.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ impl Default for Text2dBundle {
5757
/// System for drawing text in a 2D scene via a 2D `OrthographicCameraBundle`. Included in the
5858
/// default `TextPlugin`. Position is determined by the `Transform`'s translation, though scale and
5959
/// rotation are ignored.
60+
#[allow(clippy::type_complexity)]
6061
pub fn draw_text2d_system(
6162
mut context: DrawContext,
6263
msaa: Res<Msaa>,
@@ -125,7 +126,7 @@ pub struct QueuedText2d {
125126
}
126127

127128
/// Updates the TextGlyphs with the new computed glyphs from the layout
128-
#[allow(clippy::too_many_arguments)]
129+
#[allow(clippy::too_many_arguments, clippy::type_complexity)]
129130
pub fn text2d_system(
130131
mut queued_text: Local<QueuedText2d>,
131132
mut textures: ResMut<Assets<Texture>>,

0 commit comments

Comments
 (0)