From 0440e09cb1515da2320c45573b8c367b68081aaf Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Wed, 3 Jun 2020 09:41:35 +0200 Subject: silence rand warning Signed-off-by: Marc-Antoine Perennou --- examples/introduction.rs | 4 ++-- 1 file 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 += "&"; -- cgit v1.2.3