Skip to content

Instantly share code, notes, and snippets.

@ryochack
Last active March 22, 2018 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryochack/0670a404d0a004331a7d2a8d4ba4a94e to your computer and use it in GitHub Desktop.
Save ryochack/0670a404d0a004331a7d2a8d4ba4a94e to your computer and use it in GitHub Desktop.
use std::io;
use std::fs::File;
fn main() {
let r = io::stdin();
let mut reader = r.lock();
let mut writer = File::create("temp_copy.txt").unwrap();
let _ = io::copy(&mut reader, &mut writer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment