silence rng deprecation warning

This commit is contained in:
Niko Matsakis 2019-06-23 05:17:10 -07:00
parent 5bbd500c64
commit 7bf4f9dc4f

View file

@ -1,3 +1,4 @@
use rand::seq::SliceRandom;
use rand::Rng;
use salsa::Database;
use salsa::ParallelDatabase;
@ -82,7 +83,7 @@ enum ReadOp {
impl rand::distributions::Distribution<Query> for rand::distributions::Standard {
fn sample<R: rand::Rng + ?Sized>(&self, rng: &mut R) -> Query {
*rng.choose(&[Query::A, Query::B, Query::C]).unwrap()
*[Query::A, Query::B, Query::C].choose(rng).unwrap()
}
}