improved output of day 5
This commit is contained in:
+2
-3
@@ -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::<usize>().unwrap();
|
||||
if result[position] == ' ' {
|
||||
result[position] = the_char;
|
||||
println!("{}", result.iter().collect::<String>());
|
||||
print!("\r{}", result.iter().collect::<String>());
|
||||
std::io::stdout().flush().unwrap();
|
||||
}
|
||||
}
|
||||
if !result.contains(&' ') {
|
||||
|
||||
Reference in New Issue
Block a user