From 392a5eec75d1a725386781b3c16a86fe33248892 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 13 Dec 2024 08:46:04 -0500 Subject: [PATCH] fix: clippy lints --- benches/benches/bevy_ecs/change_detection.rs | 2 +- benches/benches/bevy_ecs/empty_archetypes.rs | 6 +++--- .../bevy_ecs/iteration/iter_simple_foreach_hybrid.rs | 2 +- .../bevy_ecs/iteration/par_iter_simple_foreach_hybrid.rs | 2 +- benches/benches/bevy_ecs/observers/simple.rs | 2 +- benches/benches/bevy_ecs/scheduling/schedule.rs | 2 +- benches/benches/bevy_math/bezier.rs | 2 +- benches/benches/bevy_reflect/function.rs | 1 + 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/benches/benches/bevy_ecs/change_detection.rs b/benches/benches/bevy_ecs/change_detection.rs index a07320cf1809b..ca57da93fabe6 100644 --- a/benches/benches/bevy_ecs/change_detection.rs +++ b/benches/benches/bevy_ecs/change_detection.rs @@ -350,7 +350,7 @@ fn multiple_archetype_none_changed_detection_generic< assert_eq!(0, count); }, criterion::BatchSize::LargeInput, - ) + ); }, ); } diff --git a/benches/benches/bevy_ecs/empty_archetypes.rs b/benches/benches/bevy_ecs/empty_archetypes.rs index 139f52ce843d2..daec970b74a87 100644 --- a/benches/benches/bevy_ecs/empty_archetypes.rs +++ b/benches/benches/bevy_ecs/empty_archetypes.rs @@ -180,7 +180,7 @@ fn empty_archetypes(criterion: &mut Criterion) { |bencher, &_| { bencher.iter(|| { schedule.run(&mut world); - }) + }); }, ); } @@ -211,7 +211,7 @@ fn empty_archetypes(criterion: &mut Criterion) { |bencher, &_| { bencher.iter(|| { schedule.run(&mut world); - }) + }); }, ); } @@ -242,7 +242,7 @@ fn empty_archetypes(criterion: &mut Criterion) { |bencher, &_| { bencher.iter(|| { schedule.run(&mut world); - }) + }); }, ); } diff --git a/benches/benches/bevy_ecs/iteration/iter_simple_foreach_hybrid.rs b/benches/benches/bevy_ecs/iteration/iter_simple_foreach_hybrid.rs index 0db614c9aca44..e6ee627e1849f 100644 --- a/benches/benches/bevy_ecs/iteration/iter_simple_foreach_hybrid.rs +++ b/benches/benches/bevy_ecs/iteration/iter_simple_foreach_hybrid.rs @@ -38,6 +38,6 @@ impl<'w> Benchmark<'w> { pub fn run(&mut self) { self.1 .iter_mut(&mut self.0) - .for_each(|(mut v1, v2)| v1.0 += v2.0) + .for_each(|(mut v1, v2)| v1.0 += v2.0); } } diff --git a/benches/benches/bevy_ecs/iteration/par_iter_simple_foreach_hybrid.rs b/benches/benches/bevy_ecs/iteration/par_iter_simple_foreach_hybrid.rs index e2044c0956287..9dbcba87852f7 100644 --- a/benches/benches/bevy_ecs/iteration/par_iter_simple_foreach_hybrid.rs +++ b/benches/benches/bevy_ecs/iteration/par_iter_simple_foreach_hybrid.rs @@ -40,6 +40,6 @@ impl<'w> Benchmark<'w> { pub fn run(&mut self) { self.1 .par_iter_mut(&mut self.0) - .for_each(|(mut v1, v2)| v1.0 += v2.0) + .for_each(|(mut v1, v2)| v1.0 += v2.0); } } diff --git a/benches/benches/bevy_ecs/observers/simple.rs b/benches/benches/bevy_ecs/observers/simple.rs index bc42710cf96c3..81dd8e021e8ce 100644 --- a/benches/benches/bevy_ecs/observers/simple.rs +++ b/benches/benches/bevy_ecs/observers/simple.rs @@ -20,7 +20,7 @@ pub fn observe_simple(criterion: &mut Criterion) { world.add_observer(empty_listener_base); bencher.iter(|| { for _ in 0..10000 { - world.trigger(EventBase) + world.trigger(EventBase); } }); }); diff --git a/benches/benches/bevy_ecs/scheduling/schedule.rs b/benches/benches/bevy_ecs/scheduling/schedule.rs index 1a428b5eb85fe..0450428535713 100644 --- a/benches/benches/bevy_ecs/scheduling/schedule.rs +++ b/benches/benches/bevy_ecs/scheduling/schedule.rs @@ -120,7 +120,7 @@ pub fn build_schedule(criterion: &mut Criterion) { } pub fn empty_schedule_run(criterion: &mut Criterion) { - let mut app = bevy_app::App::default(); + let mut app = App::default(); let mut group = criterion.benchmark_group("run_empty_schedule"); diff --git a/benches/benches/bevy_math/bezier.rs b/benches/benches/bevy_math/bezier.rs index c367cb30298dd..404ab08a63eb2 100644 --- a/benches/benches/bevy_math/bezier.rs +++ b/benches/benches/bevy_math/bezier.rs @@ -8,7 +8,7 @@ fn easing(c: &mut Criterion) { b.iter(|| { (0..1000).map(|i| i as f32 / 1000.0).for_each(|t| { black_box(cubic_bezier.ease(black_box(t))); - }) + }); }); }); } diff --git a/benches/benches/bevy_reflect/function.rs b/benches/benches/bevy_reflect/function.rs index f40b9149eec64..5398cc3da91e2 100644 --- a/benches/benches/bevy_reflect/function.rs +++ b/benches/benches/bevy_reflect/function.rs @@ -83,6 +83,7 @@ fn overload(c: &mut Criterion) { a + b } + #[expect(clippy::too_many_arguments)] fn complex( _: T0, _: T1,