Created
March 28, 2015 22:43
-
-
Save tilpner/5ae9f96e2f544de11f9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{ self, BufReader, BufRead }; | |
fn main() { | |
let input = BufReader::new(io::stdin()); | |
let mut buffer = String::new(); | |
for line in input.lines() { | |
match line { | |
Ok(l) => buffer.push_str(&l), | |
Err(e) => panic!(e) | |
} | |
} | |
println!("Input: {}", buffer); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment