Migrate to String::new()
This commit is contained in:
1 parent
1d4b37e381
commit
a5526dc5e9
8 files changed
+19
-19
No files matched your search
@@ -65,11 +65,11 @@ impl WritingState {
|
||||
let mut list = set.list();
|
||||
list.shuffle(&mut rand::rng());
|
||||
WritingState {
|
||||
kana: "".to_string(),
|
||||
kana: String::new(),
|
||||
set: list.clone(),
|
||||
original_set: list,
|
||||
kana_total: "".to_string(),
|
||||
roman_total: "".to_string(),
|
||||
kana_total: String::new(),
|
||||
roman_total: String::new(),
|
||||
next_text: "Дальше".to_string(),
|
||||
show_all: false,
|
||||
}
|
||||
@@ -79,9 +79,9 @@ impl WritingState {
|
||||
impl WritingState {
|
||||
fn next(&mut self) {
|
||||
if self.set.is_empty() {
|
||||
self.kana = "".to_string();
|
||||
self.roman_total = "".to_string();
|
||||
self.kana_total = "".to_string();
|
||||
self.kana = String::new();
|
||||
self.roman_total = String::new();
|
||||
self.kana_total = String::new();
|
||||
|
||||
self.set = self.original_set.clone();
|
||||
self.set.shuffle(&mut rand::rng());
|
||||
|
||||
Reference in new issue
Block a user