mirror of
https://github.com/dandavison/delta.git
synced 2024-10-05 04:17:21 +03:00
Read from stdin, write to stdout
This commit is contained in:
parent
5a4361fa03
commit
4404c17c22
@ -1,3 +1,10 @@
|
||||
use std::io::{self, Read, Write};
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let mut stdin = io::stdin();
|
||||
let mut stdout = io::stdout();
|
||||
let mut buf = String::new();
|
||||
stdin.read_to_string(&mut buf);
|
||||
stdout.write_all(buf.as_bytes());
|
||||
stdout.flush();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user