main : use std::io
This commit is contained in:
parent
9ed1364e0e
commit
8902a6967d
1 changed files with 4 additions and 2 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue