diff options
author | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2020-06-03 09:41:35 +0200 |
---|---|---|
committer | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2020-06-03 09:41:41 +0200 |
commit | 0440e09cb1515da2320c45573b8c367b68081aaf (patch) | |
tree | 79733c2758c1ee6e2d30f0526d233d1d82573ad9 | |
parent | b9178fc5e80f7ce47e3064683d36e4284942af74 (diff) |
silence rand warning
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r-- | examples/introduction.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/introduction.rs b/examples/introduction.rs index 34cb530..fb91b3e 100644 --- a/examples/introduction.rs +++ b/examples/introduction.rs @@ -4,7 +4,7 @@ extern crate serde_derive; extern crate serde_qs as qs; extern crate serde_urlencoded as urlencoded; -use rand::Rng; +use rand::seq::SliceRandom; use std::collections::HashMap; use qs::Config; @@ -104,7 +104,7 @@ fn main() { let mut rng = rand::thread_rng(); for _ in 0..10 { let mut acc = String::new(); - rng.shuffle(&mut inputs); + inputs.shuffle(&mut rng); for input in &inputs { acc += input; acc += "&"; |