main : traitement EOF
This commit is contained in:
parent
cf76069979
commit
0e79d25d7d
1 changed files with 5 additions and 0 deletions
|
@ -18,5 +18,10 @@ fn main() {
|
|||
bytes_read = io::stdin()
|
||||
.read_line(&mut user_input)
|
||||
.expect("error reading user input");
|
||||
|
||||
if bytes_read == 0 {
|
||||
println!();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue