Merge pull request 'fix error handler' (#3) from computerdruid/hanoigame:push-omrvkqpsolyv into main

Reviewed-on: #3
This commit is contained in:
jana 2025-09-03 19:41:02 +02:00
commit cf5b93cb0d

View file

@ -465,8 +465,8 @@ impl<const TOWER_HEIGHT: usize> Game<TOWER_HEIGHT> {
}
fn ask_tower(&self, msg: &str) -> io::Result<Input> {
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)?;