Skip to content

Commit a9292f7

Browse files
committed
Run ./x fmt --all
1 parent 5413186 commit a9292f7

File tree

1 file changed

+5
-9
lines changed
  • library/core/benches/num/int_sqrt

1 file changed

+5
-9
lines changed

library/core/benches/num/int_sqrt/mod.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ macro_rules! int_sqrt_bench {
1919
fn $random(bench: &mut Bencher) {
2020
let mut rng = crate::bench_rng();
2121
/* Exponentially distributed random numbers from the whole range of the type. */
22-
let numbers: Vec<$t> = (0..256)
23-
.map(|_| rng.gen::<$t>() >> rng.gen_range(0..<$t>::BITS))
24-
.collect();
22+
let numbers: Vec<$t> =
23+
(0..256).map(|_| rng.gen::<$t>() >> rng.gen_range(0..<$t>::BITS)).collect();
2524
bench.iter(|| {
2625
for x in &numbers {
2726
black_box(black_box(x).isqrt());
@@ -33,9 +32,8 @@ macro_rules! int_sqrt_bench {
3332
fn $random_small(bench: &mut Bencher) {
3433
let mut rng = crate::bench_rng();
3534
/* Exponentially distributed random numbers from the range 0..256. */
36-
let numbers: Vec<$t> = (0..256)
37-
.map(|_| (rng.gen::<u8>() >> rng.gen_range(0..u8::BITS)) as $t)
38-
.collect();
35+
let numbers: Vec<$t> =
36+
(0..256).map(|_| (rng.gen::<u8>() >> rng.gen_range(0..u8::BITS)) as $t).collect();
3937
bench.iter(|| {
4038
for x in &numbers {
4139
black_box(black_box(x).isqrt());
@@ -47,9 +45,7 @@ macro_rules! int_sqrt_bench {
4745
fn $random_uniform(bench: &mut Bencher) {
4846
let mut rng = crate::bench_rng();
4947
/* Exponentially distributed random numbers from the whole range of the type. */
50-
let numbers: Vec<$t> = (0..256)
51-
.map(|_| rng.gen::<$t>())
52-
.collect();
48+
let numbers: Vec<$t> = (0..256).map(|_| rng.gen::<$t>()).collect();
5349
bench.iter(|| {
5450
for x in &numbers {
5551
black_box(black_box(x).isqrt());

0 commit comments

Comments
 (0)