adambudziak/shuffle

Example does not work anymore

Closed this issue · 3 comments

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'}

Thanks, I'll investigate

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"

Resolved by #8