fix error handler

This commit is contained in:
Dan Johnson 2025-09-02 13:33:33 -07:00
parent 1e3fca6f51
commit ea3c02262f

View file

@ -473,8 +473,8 @@ impl<const TOWER_HEIGHT: usize> Game<TOWER_HEIGHT> {
} }
fn ask_tower(&self, msg: &str) -> io::Result<Input> { fn ask_tower(&self, msg: &str) -> io::Result<Input> {
let mut res = String::new();
loop { loop {
let mut res = String::new();
print!("{msg} (enter a tower number, exit, clear or undo):"); print!("{msg} (enter a tower number, exit, clear or undo):");
stdout().flush()?; stdout().flush()?;
stdin().read_line(&mut res)?; stdin().read_line(&mut res)?;