From ea3c02262f60dd0cd85c7e991cc8b82b57e0600c Mon Sep 17 00:00:00 2001 From: Dan Johnson Date: Tue, 2 Sep 2025 13:33:33 -0700 Subject: [PATCH] fix error handler --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index fc41c56..a7409e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -473,8 +473,8 @@ impl Game { } fn ask_tower(&self, msg: &str) -> io::Result { - let mut res = String::new(); loop { + let mut res = String::new(); print!("{msg} (enter a tower number, exit, clear or undo):"); stdout().flush()?; stdin().read_line(&mut res)?; -- 2.50.1