1
0

butt(1): better error handling

This commit is contained in:
Emma Tebibyte 2024-07-03 16:31:39 -06:00
parent be9add4466
commit 7d450a6811
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -14,15 +14,16 @@ fn main() {
let mut buf = String::new();
println!("How big is your butt?");
stdin().read_line(&mut buf).unwrap();
let _ = stdin().read_line(&mut buf);
println!("{}", match buf.trim().parse::<u8>().unwrap_or_else(|_| {
eprintln!("Your butt cant be {}!", buf.trim());
exit(1);
}) {
0..=2 => "Your butt is small Im not gonna smack it ",
3 => "Your butt is decently sized, if im super horny ill smack and maybe lick it",
4 => "Your butt is pretty big there, Why don't you come down and ill show it a good time!",
println!("{}", match buf.trim().parse::<u8>() {
Ok(0..=2) => "Your butt is small Im not gonna smack it ",
Ok(3) => "Your butt is decently sized, if im super horny ill smack and maybe lick it",
Ok(4) => "Your butt is pretty big there, Why don't you come down and ill show it a good time!",
Err(_) => {
eprintln!("Your butt cant be {}!", buf.trim());
exit(1);
}
_ => "WOW Your butt is pretty big! you better pull your pants down RIGHT NOW so i can lick it clean",
});
}