Created
March 22, 2015 21:13
-
-
Save tilpner/53b0c9d8297e7a705a86 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