From 1e0dc6c278a56b0fcbc3e953039abf9808b4a043 Mon Sep 17 00:00:00 2001 From: Greg Guthe <226605+g-k@users.noreply.github.com> Date: Mon, 17 Jan 2022 21:23:55 -0500 Subject: [PATCH] tests: update test_random to take range Fix 'error[E0061]: this function takes 1 argument but 2 arguments were supplied'. --- tests/by-util/test_factor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/by-util/test_factor.rs b/tests/by-util/test_factor.rs index bcb1238bf..bd265f4ce 100644 --- a/tests/by-util/test_factor.rs +++ b/tests/by-util/test_factor.rs @@ -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;