From 005da0d8c98f68554c1481a0a242ffb1e55e1cda Mon Sep 17 00:00:00 2001 From: leca Date: Tue, 2 Apr 2024 16:15:26 +0300 Subject: [PATCH] remove unneded dep and add kana to stdout --- Cargo.toml | 1 - src/ui/guessing/game/imp.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 195af2d..40ba618 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -dirs = "5.0.1" gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] } rand = "0.8.5" diff --git a/src/ui/guessing/game/imp.rs b/src/ui/guessing/game/imp.rs index 5d1027e..5a3f20a 100644 --- a/src/ui/guessing/game/imp.rs +++ b/src/ui/guessing/game/imp.rs @@ -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);