update rand (#304)

Fixes #298

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
Marc-Antoine Perennou 2021-02-03 11:44:39 +01:00 committed by GitHub
parent cbef83704b
commit fbcc301667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ proptest = "0.10"
snap = "1.0"
# prime_numbers example
bastion-utils = { version = "0.3.2", path = "../bastion-utils" }
rand = "0.7.3"
rand = "0.8"
rayon = "1.3.1"
num_cpus = "1.13.0"
# hello_tokio example

View File

@ -52,7 +52,7 @@ mod prime_number {
// the closing parenthesiss means it won't reach the number.
// the maximum allowed value for maybe_prime is 9999.
use rand::Rng;
let mut maybe_prime = rand::thread_rng().gen_range(min_bound, max_bound);
let mut maybe_prime = rand::thread_rng().gen_range(min_bound..max_bound);
loop {
if is_prime(maybe_prime) {
return number_or_panic(maybe_prime);