diff --git a/day05/src/main.rs b/day05/src/main.rs index e2f1cb1..e067ac8 100644 --- a/day05/src/main.rs +++ b/day05/src/main.rs @@ -9,8 +9,6 @@ const INPUT: &str = "cxdnnyjw"; fn main() { part1(); - println!(); - part2(); } @@ -32,7 +30,8 @@ fn part2() { let position = the_position.to_string().parse::().unwrap(); if result[position] == ' ' { result[position] = the_char; - println!("{}", result.iter().collect::()); + print!("\r{}", result.iter().collect::()); + std::io::stdout().flush().unwrap(); } } if !result.contains(&' ') {