fmt
parent
27a6c614d5
commit
cdf233619f
|
@ -28,14 +28,14 @@ impl Default for Dice {
|
|||
assert_eq!(words[600], "large");
|
||||
assert_eq!(words[1252], "zoom");
|
||||
|
||||
Self {
|
||||
words,
|
||||
}
|
||||
Self { words }
|
||||
}
|
||||
}
|
||||
|
||||
impl Dice {
|
||||
pub fn pick_word(&self) -> &str {
|
||||
self.words.choose(&mut rand::thread_rng ()).expect("`choose` should always return `Some`")
|
||||
self.words
|
||||
.choose(&mut rand::thread_rng())
|
||||
.expect("`choose` should always return `Some`")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue