Writing test page
This commit is contained in:
+10
-4
@@ -180,6 +180,14 @@ 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()
|
||||
}
|
||||
|
||||
pub fn list(&self) -> Vec<(String, String)> {
|
||||
let mut current_set: Vec<(String, String)> = Vec::new();
|
||||
|
||||
for i in 0..10 {
|
||||
@@ -189,10 +197,8 @@ impl KanaSet {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let mut rand = rand::rng();
|
||||
let index: u32 = rand.random();
|
||||
current_set[index as usize % current_set.len()].clone()
|
||||
|
||||
current_set
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user