Skip to content

Commit 2ed508b

Browse files
authored
Use non-deprecated rng generation function (#115)
1 parent 7c4a6e7 commit 2ed508b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benches/prime_benches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn benchmarks(c: &mut Criterion) {
2525
primality_testing.throughput(Throughput::Elements(N));
2626
primality_testing.bench_function(format!("is_prime on {N} random numbers"), |b| {
2727
b.iter_batched(
28-
|| (0..N).map(|_| rng.gen()).collect::<Vec<u64>>(),
28+
|| (0..N).map(|_| rng.random()).collect::<Vec<u64>>(),
2929
|data| {
3030
for &number in &data {
3131
black_box(is_prime(number));

0 commit comments

Comments
 (0)