main : supprimer le buffer avant nouvelle initialisation

This commit is contained in:
Ahurac 2024-04-09 12:19:21 +02:00
parent 66d0cceb60
commit cf76069979

View file

@ -14,6 +14,7 @@ fn main() {
print!("$ ");
io::stdout().flush().unwrap();
user_input.clear();
bytes_read = io::stdin()
.read_line(&mut user_input)
.expect("error reading user input");