News for hackers. Stuff that matters.
Re:Getting Past C by rnestler on Tuesday January 03, 2017 @05:35PM (#13313844)
Did you mean something like this?

    use std::io::{self, Read};
    fn main() {
        let stdin = io::stdin();
        let mut data = vec![];
        stdin.lock().read_to_end(&mut data)
            .expect("Reading stdin failed");
    }
Re:Getting Past C by dbaupp on Tuesday January 03, 2017 @05:49PM (#13313970)
(FWIW, You could golf that to io::stdin().read_to_end(...), because the Read implementation for Stdin does the same locking internally: https://github.com/rust-lang/rust/blob/8f62c2920077eb5cb8132... .)