Skip to content

Instantly share code, notes, and snippets.

@kaubu
Created May 7, 2021 23:29
Show Gist options
  • Save kaubu/5d0d2060f7e2cc875a77472ea7ad19fa to your computer and use it in GitHub Desktop.
Save kaubu/5d0d2060f7e2cc875a77472ea7ad19fa to your computer and use it in GitHub Desktop.
fn input(msg: &str) -> String {
print!("{}", msg);
let mut input = String::new();
io::stdout().flush().unwrap();
io::stdin().read_line(&mut input).unwrap();
input.trim().to_string()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment