This is the code I have:
fn main() {
use std::io::stdin;
let mut s=String::new();
stdin().read_line(&mut s).expect("Wrong input");
let n = s.parse::<u32>();
println!("Try: {:?}", n);
}
I get no error while compiling, but it prints this in running time:
Err(ParseIntError { kind: InvalidDigit })