From 66d0cceb601d61ab6ebcc8ba3d267b5db3822a26 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Tue, 9 Apr 2024 12:18:55 +0200 Subject: [PATCH] =?UTF-8?q?main=20:=20pas=20de=20valeur=20par=20d=C3=A9fau?= =?UTF-8?q?t=20pour=20`bytes=5Fread`,=20la=20boucle=20devient=20infinie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 631d390..4723e26 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,9 +8,9 @@ fn exit() { fn main() { let mut user_input = String::new(); - let mut bytes_read = 1; + let mut bytes_read; - while bytes_read != 0 { + loop { print!("$ "); io::stdout().flush().unwrap();