Skip to content

Instantly share code, notes, and snippets.

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