more shuffles
rodzic
16a31fb177
commit
ba2138f77d
|
@ -50,7 +50,8 @@ mod tests {
|
|||
|
||||
let mut three_wise_monkeys = vec!['🙈','🙉', '🙊'];
|
||||
three_wise_monkeys.shuffle(&mut rng);
|
||||
assert_eq!(three_wise_monkeys, ['🙈', '🙉', '🙊']);
|
||||
three_wise_monkeys.shuffle(&mut rng); // in this case, the first time won't change anything
|
||||
assert_eq!(three_wise_monkeys, ['🙈', '🙊', '🙉']);
|
||||
|
||||
let mut three_wise_monkeys = vec!['🙈', '🙉', '🙊'];
|
||||
let partial = three_wise_monkeys.partial_shuffle(&mut rng, 2);
|
||||
|
|
Ładowanie…
Reference in New Issue