can write with self

This commit is contained in:
nora 2021-03-22 14:50:05 +01:00
commit 04001ac5db
9 changed files with 76 additions and 0 deletions

0
src/lib.rs Normal file
View file

24
src/main.rs Normal file
View file

@ -0,0 +1,24 @@
use std::io::{self, Write};
fn main() {
println!("
_______ _ _ _____ _ _
|__ __| (_) | |/ ____| | | |
| | ___ _ __ _ __ ___ _ _ __ __ _| | | | |__ __ _| |_
| |/ _ \\ '__| '_ ` _ \\| | '_ \\ / _` | | | | '_ \\ / _` | __|
| | __/ | | | | | | | | | | | (_| | | |____| | | | (_| | |_
|_|\\___|_| |_| |_| |_|_|_| |_|\\__,_|_|\\_____|_| |_|\\__,_|\\__|
---------------------------------------------------------------
Version 0.1");
let stdin = io::stdin();
loop {
print!("> ");
io::stdout().flush();
let mut buffer = String::new();
stdin.read_line(&mut buffer);
println!("{}", buffer);
}
}