remove unneded dep and add kana to stdout
This commit is contained in:
@@ -88,7 +88,7 @@ impl ObjectImpl for GuessingScene {
|
||||
@strong answer_entry_binding as answer_entry,
|
||||
@strong stats_label_binding as stats_label => move |_entry: &Entry| {
|
||||
let answer: &String = &answer_entry.text().to_string();
|
||||
println!("{} <-> {}? = {}", answer, correct_answer.borrow().to_string(), *answer == correct_answer.borrow().to_string());
|
||||
println!("{} <-> {}({})? = {}", answer, correct_answer.borrow().to_string(), question.borrow(), *answer == correct_answer.borrow().to_string());
|
||||
*stats.borrow_mut() = if *answer == correct_answer.borrow().to_string() { (stats.borrow().0 + 1, stats.borrow().1) } else {(stats.borrow().0, stats.borrow().1 + 1)};
|
||||
stats_label.set_label(format!("Correct|Incorrect: {}|{} ({:.2}%)", stats.borrow().0, stats.borrow().1, 100.0 * f64::from(stats.borrow().0) / f64::from(stats.borrow().0 + stats.borrow().1)).as_str());
|
||||
*question.borrow_mut() = ask(ktr, rtk, hiragana, katakana);
|
||||
|
||||
Reference in New Issue
Block a user