main : use std::io

This commit is contained in:
Ahurac 2024-04-09 12:18:05 +02:00
parent 9ed1364e0e
commit 8902a6967d

View file

@ -1,3 +1,4 @@
use std::io;
use std::io::Write; use std::io::Write;
fn main() { fn main() {
@ -6,8 +7,9 @@ fn main() {
while bytes_read != 0 { while bytes_read != 0 {
print!("$ "); print!("$ ");
std::io::stdout().flush().unwrap(); io::stdout().flush().unwrap();
bytes_read = std::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");
} }