Merge pull request #34 from ndarilek/master

Upgrade to rand 0.8.
This commit is contained in:
Krzysztof Langner 2021-01-12 18:58:55 +01:00 committed by GitHub
commit f25b454c00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -11,4 +11,4 @@ documentation = "https://docs.rs/mapgen"
edition = "2018"
[dependencies]
rand = "0.7"
rand = "0.8"

View File

@ -41,7 +41,7 @@ mod tests {
#[test]
fn test_range_average() {
let num_op = 1000;
let num_op = 10000;
let mut rng = StdRng::seed_from_u64(1000);
let xs: Vec<usize> = (0..num_op).map(|_| rng.random_range(5, 10)).collect();
let mean = xs.iter().sum::<usize>() / num_op;