mirror of
https://github.com/Noratrieb/terminal-chat.git
synced 2026-01-15 00:45:10 +01:00
can write with self
This commit is contained in:
commit
04001ac5db
9 changed files with 76 additions and 0 deletions
0
src/lib.rs
Normal file
0
src/lib.rs
Normal file
24
src/main.rs
Normal file
24
src/main.rs
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue