diff --git a/src/main.rs b/src/main.rs index 90085a7..0248647 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +use std::io; use std::io::Write; fn main() { @@ -6,8 +7,9 @@ fn main() { while bytes_read != 0 { print!("$ "); - std::io::stdout().flush().unwrap(); - bytes_read = std::io::stdin() + io::stdout().flush().unwrap(); + + bytes_read = io::stdin() .read_line(&mut user_input) .expect("error reading user input"); }