Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. use std::io::{self, Read};
  2.  
  3. fn main() {
  4. let input = get_input();
  5. println!("Input: {}", input);
  6. }
  7.  
  8. fn get_input() -> String {
  9. let mut buf = String::new();
  10. io::stdin()
  11. .read_line(&mut buf)
  12. .expect("ya done screwed up!");
  13. buf
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement