main : pas de valeur par défaut pour bytes_read, la boucle devient infinie

This commit is contained in:
Ahurac 2024-04-09 12:18:55 +02:00
parent 8008b7d510
commit 66d0cceb60

View file

@ -8,9 +8,9 @@ fn exit() {
fn main() { fn main() {
let mut user_input = String::new(); let mut user_input = String::new();
let mut bytes_read = 1; let mut bytes_read;
while bytes_read != 0 { loop {
print!("$ "); print!("$ ");
io::stdout().flush().unwrap(); io::stdout().flush().unwrap();