From 55838d42ac6217a5b9ad87ebe884f7a2c9902fc0 Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 24 Nov 2018 23:26:39 +0100 Subject: [PATCH] MAINT: Update quickcheck to 0.7 and rand to 0.5 --- benches/bench.rs | 7 ++++++- tests/quick.rs | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/benches/bench.rs b/benches/bench.rs index b3e9915..20eedb6 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -20,7 +20,12 @@ use indexmap::IndexMap; use std::collections::HashMap; use std::iter::FromIterator; -use rand::{weak_rng, Rng}; +use rand::{thread_rng, Rng, SeedableRng}; +use rand::rngs::SmallRng; + +fn weak_rng() -> SmallRng { + SmallRng::from_rng(thread_rng()).unwrap() +} #[bench] fn new_hashmap(b: &mut Bencher) { diff --git a/tests/quick.rs b/tests/quick.rs index 14f267c..413637d 100644 --- a/tests/quick.rs +++ b/tests/quick.rs @@ -3,6 +3,7 @@ extern crate indexmap; extern crate itertools; #[macro_use] extern crate quickcheck; +extern crate rand; extern crate fnv; @@ -11,6 +12,7 @@ use itertools::Itertools; use quickcheck::Arbitrary; use quickcheck::Gen; +use rand::Rng; use fnv::FnvHasher; use std::hash::{BuildHasher, BuildHasherDefault}; -- 2.22.0