History of Idiom 11 > diff from v70 to v71
Edit summary for version 71 by programming-idioms.org:
[Rust] Variable name x. No sample values. Comments emphasis.
[Rust] Variable name x. No sample values. Comments emphasis.
↷
Version 70
2018-06-11, 19:30:57
Version 71
2018-08-03, 20:33:59
Idiom #11 Pick a random element from a list
List x must be non-empty.
Idiom #11 Pick a random element from a list
List x must be non-empty.
Comments bubble
(https://crates.io/crates/rand)
The choose method returns an Option which is None if the given list is empty.
Comments bubble
(https://crates.io/crates/rand)
The choose method returns an Option which is None if x is empty.