mirror of https://github.com/bastion-rs/bastion
update rand (#304)
Fixes #298 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
parent
cbef83704b
commit
fbcc301667
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue