Skip to content

Instantly share code, notes, and snippets.

@moaible
Last active September 1, 2018 14:41
Show Gist options
  • Select an option

  • Save moaible/2f82fcd9e57eb6f59419130eaf8da1dd to your computer and use it in GitHub Desktop.

Select an option

Save moaible/2f82fcd9e57eb6f59419130eaf8da1dd to your computer and use it in GitHub Desktop.
use std::io;
fn main() {
println!("{}", read_line())
}
fn read_line() -> String {
let mut line = String::new();
io::stdin().read_line(&mut line)
.expect("Failed to read line");
return line
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment