adding wrong input type handling. finished.

This commit is contained in:
tobyatgithub 2021-12-29 17:37:18 -08:00
parent 248972ed04
commit 700d6ba478

View File

@ -17,7 +17,10 @@ fn main() {
let guess: u32 = match guess.trim().parse() {
Ok(num) => num,
Err(_) => continue,
Err(_) => {
println!("Please input an integer!\n");
continue;
}
};
println!("You guessed : {}", guess);