Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created March 22, 2015 21:13
Show Gist options
  • Save tilpner/53b0c9d8297e7a705a86 to your computer and use it in GitHub Desktop.
Save tilpner/53b0c9d8297e7a705a86 to your computer and use it in GitHub Desktop.
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