Better random for quiz
This commit is contained in:
1 parent
87a9fae91a
commit
db2eb22c02
3 files changed
+16
-2
No files matched your search
+1
-1
@@ -181,7 +181,7 @@ impl KanaSet {
|
||||
|
||||
pub fn next(&mut self) -> (String, String) {
|
||||
let current_set = self.list();
|
||||
|
||||
|
||||
let mut rand = rand::rng();
|
||||
let index: u32 = rand.random();
|
||||
current_set[index as usize % current_set.len()].clone()
|
||||
|
||||
Reference in new issue
Block a user