mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
9 lines
204 B
Rust
9 lines
204 B
Rust
// { "stdin": "Hello, stdin!" }
|
|
|
|
use std::io::Read;
|
|
|
|
fn main() {
|
|
let mut buffer = String::new();
|
|
assert!(std::io::stdin().read_to_string(&mut buffer).is_ok());
|
|
assert_eq!(buffer, "Hello, stdin!")
|
|
}
|