We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16a31fb commit ba2138fCopy full SHA for ba2138f
Chapter10/random-numbers/src/lib.rs
@@ -48,9 +48,10 @@ mod tests {
48
let chosen = emoji.choose_multiple(&mut rng, 3);
49
assert_eq!(chosen, ['😱', '🙃', '😭']);
50
51
- let mut three_wise_monkeys = vec!['🙈', '🙉', '🙊'];
+ let mut three_wise_monkeys = vec!['🙈','🙉', '🙊'];
52
three_wise_monkeys.shuffle(&mut rng);
53
- assert_eq!(three_wise_monkeys, ['🙈', '🙉', '🙊']);
+ three_wise_monkeys.shuffle(&mut rng); // in this case, the first time won't change anything
54
+ assert_eq!(three_wise_monkeys, ['🙈', '🙊', '🙉']);
55
56
let mut three_wise_monkeys = vec!['🙈', '🙉', '🙊'];
57
let partial = three_wise_monkeys.partial_shuffle(&mut rng, 2);
0 commit comments