remove unneded dep and add kana to stdout
This commit is contained in:
		@@ -6,7 +6,6 @@ edition = "2021"
 | 
				
			|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 | 
					# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies]
 | 
					[dependencies]
 | 
				
			||||||
dirs = "5.0.1"
 | 
					 | 
				
			||||||
gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] }
 | 
					gtk = { version = "0.8.1", package = "gtk4", features = ["v4_12"] }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rand = "0.8.5"
 | 
					rand = "0.8.5"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,7 +88,7 @@ impl ObjectImpl for GuessingScene {
 | 
				
			|||||||
                                                @strong answer_entry_binding as answer_entry,
 | 
					                                                @strong answer_entry_binding as answer_entry,
 | 
				
			||||||
                                                @strong stats_label_binding as stats_label => move |_entry: &Entry| {
 | 
					                                                @strong stats_label_binding as stats_label => move |_entry: &Entry| {
 | 
				
			||||||
            let answer: &String = &answer_entry.text().to_string();
 | 
					            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.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());
 | 
					            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);
 | 
					            *question.borrow_mut() = ask(ktr, rtk, hiragana, katakana);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user