Example does not work anymore
Closed this issue · 3 comments
makorne commented
use shuffle::shuffler::Shuffler;
use shuffle::irs::Irs;
use rand::rngs::mock::StepRng;
let mut rng = StepRng::new(2, 13);
let mut irs = Irs::default();
let mut input = vec![1, 2, 3, 4, 5];
irs.shuffle(&mut input, &mut rng);
assert_eq!(&input, &[4, 1, 5, 3, 2]);
irs.shuffle(&mut input, &mut rng);
| ^^^^^^^^ the trait `rand_core::RngCore` is not implemented for `StepRng`
shuffle = {git = 'https://github.com/adambudziak/shuffle'}
adambudziak commented
Thanks, I'll investigate
makorne commented
Thanks for your prompt answer!
Looks like I found the problem.
It is with rand = "0.8".
Your code works only with rand = "0.7"
adambudziak commented
Resolved by #8