tests: update test_random to take range

Fix 'error[E0061]: this function takes 1 argument but 2 arguments were supplied'.
This commit is contained in:
Greg Guthe 2022-01-17 21:23:55 -05:00
parent 771c9f5d9c
commit 1e0dc6c278

View file

@ -115,7 +115,7 @@ fn test_random() {
// log distribution---higher probability for lower numbers
let factor;
loop {
let next = rng.gen_range(0_f64, log_num_primes).exp2().floor() as usize;
let next = rng.gen_range(0_f64..log_num_primes).exp2().floor() as usize;
if next < NUM_PRIMES {
factor = primes[next];
break;