Skip to content

Commit

Permalink
refactor: run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
BD103 committed Dec 9, 2024
1 parent 5d26f56 commit afc8d33
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 30 deletions.
2 changes: 1 addition & 1 deletion benches/benches/bevy_ecs/components/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use criterion::*;

mod add_remove;
mod add_remove_big_sparse_set;
mod add_remove_big_table;
mod add_remove_sparse_set;
mod add_remove_table;
mod add_remove_very_big_table;
mod add_remove;
mod archetype_updates;
mod insert_simple;
mod insert_simple_unbatched;
Expand Down
2 changes: 1 addition & 1 deletion benches/benches/bevy_ecs/fragmentation/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use bevy_ecs::prelude::*;
use bevy_ecs::system::SystemState;
use core::hint::black_box;
use criterion::*;
use glam::*;
use core::hint::black_box;

criterion_group!(fragmentation_benches, iter_frag_empty);

Expand Down
5 changes: 4 additions & 1 deletion benches/benches/bevy_ecs/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#![expect(dead_code, reason = "Many fields are unused/unread as they are just for benchmarking purposes.")]
#![expect(
dead_code,
reason = "Many fields are unused/unread as they are just for benchmarking purposes."
)]

use criterion::criterion_main;

Expand Down
4 changes: 1 addition & 3 deletions benches/benches/bevy_math/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ use criterion::criterion_main;

mod bezier;

criterion_main!(
bezier::benches,
);
criterion_main!(bezier::benches);
4 changes: 1 addition & 3 deletions benches/benches/bevy_picking/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ use criterion::criterion_main;

mod ray_mesh_intersection;

criterion_main!(
ray_mesh_intersection::benches,
);
criterion_main!(ray_mesh_intersection::benches);
4 changes: 2 additions & 2 deletions benches/benches/bevy_reflect/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use core::{iter, time::Duration};

use bevy_reflect::{DynamicList, List};
use criterion::{
black_box, criterion_group, measurement::Measurement, BatchSize,
BenchmarkGroup, BenchmarkId, Criterion, Throughput,
black_box, criterion_group, measurement::Measurement, BatchSize, BenchmarkGroup, BenchmarkId,
Criterion, Throughput,
};

criterion_group!(
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/bevy_reflect/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use core::{fmt::Write, iter, time::Duration};
use bevy_reflect::{DynamicMap, Map};
use bevy_utils::HashMap;
use criterion::{
black_box, criterion_group, measurement::Measurement, BatchSize,
BenchmarkGroup, BenchmarkId, Criterion, Throughput,
black_box, criterion_group, measurement::Measurement, BatchSize, BenchmarkGroup, BenchmarkId,
Criterion, Throughput,
};

criterion_group!(
Expand Down
4 changes: 1 addition & 3 deletions benches/benches/bevy_reflect/path.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use core::{fmt::Write, str, time::Duration};

use bevy_reflect::ParsedPath;
use criterion::{
black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput,
};
use criterion::{black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput};
use rand::{distributions::Uniform, Rng, SeedableRng};
use rand_chacha::ChaCha8Rng;

Expand Down
4 changes: 1 addition & 3 deletions benches/benches/bevy_reflect/struct.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use core::time::Duration;

use bevy_reflect::{DynamicStruct, GetField, PartialReflect, Reflect, Struct};
use criterion::{
black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput,
};
use criterion::{black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput};

criterion_group!(
benches,
Expand Down
5 changes: 1 addition & 4 deletions benches/benches/bevy_render/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ use criterion::criterion_main;
mod render_layers;
mod torus;

criterion_main!(
render_layers::benches,
torus::benches,
);
criterion_main!(render_layers::benches, torus::benches);
9 changes: 2 additions & 7 deletions benches/benches/bevy_render/render_layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ fn render_layers(c: &mut Criterion) {
c.bench_function("layers_intersect", |b| {
let layer_a = RenderLayers::layer(1).with(2);
let layer_b = RenderLayers::layer(1);
b.iter(|| {
black_box(layer_a.intersects(&layer_b))
});
b.iter(|| black_box(layer_a.intersects(&layer_b)));
});
}

criterion_group!(
benches,
render_layers,
);
criterion_group!(benches, render_layers);

0 comments on commit afc8d33

Please sign in to comment.