Read some numbers

a guest Jan 22nd, 2020 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn read_ints() -> Result<Vec<i32>, io::Error> {
  2.   let mut k = String::new();
  3.   io::stdin().read_line(&mut k)?;
  4.   Ok(k.trim().split(" ").map(|x| x.parse().unwrap()).collect())
  5. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand