mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-24 22:03:34 +00:00
silence rng deprecation warning
This commit is contained in:
parent
5bbd500c64
commit
7bf4f9dc4f
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue