From d11150092128ea11b1fa2fb63181e6a446fd1ca1 Mon Sep 17 00:00:00 2001 From: emma Date: Wed, 3 Jul 2024 16:30:14 -0600 Subject: [PATCH] butt(1): code golfed --- fun/butt.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fun/butt.rs b/fun/butt.rs index 86906c6..eaad1f3 100644 --- a/fun/butt.rs +++ b/fun/butt.rs @@ -16,12 +16,10 @@ fn main() { println!("How big is your butt?"); stdin().read_line(&mut buf).unwrap(); - let size = buf.trim().parse::().unwrap_or_else(|e| { + println!("{}", match buf.trim().parse::().unwrap_or_else(|_| { eprintln!("Your butt can’t be {}!", buf.trim()); exit(1); - }); - - println!("{}", match size { + }) { 0 | 1 | 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!",