main : supprimer le buffer avant nouvelle initialisation
This commit is contained in:
parent
66d0cceb60
commit
cf76069979
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ fn main() {
|
||||||
print!("$ ");
|
print!("$ ");
|
||||||
io::stdout().flush().unwrap();
|
io::stdout().flush().unwrap();
|
||||||
|
|
||||||
|
user_input.clear();
|
||||||
bytes_read = io::stdin()
|
bytes_read = io::stdin()
|
||||||
.read_line(&mut user_input)
|
.read_line(&mut user_input)
|
||||||
.expect("error reading user input");
|
.expect("error reading user input");
|
||||||
|
|
Loading…
Reference in a new issue