How can I read multiple lines from stdin and advance until EOF in Rust? I\'m trying to translate this C++ code to Rust but I\'m failing.