From 54c26d6e1ed0ebe5c1d9eaca60a07aea80bd4755 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 14 Sep 2023 16:23:50 -0700 Subject: [PATCH] ARE YOU STUPID --- src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 035d2d4..d94016e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -361,12 +361,10 @@ impl std::str::FromStr for UploadAction { Ok(Self::Skip) }else if s=="new\n"{ Ok(Self::New) + }else if let Ok(asset_id)=s[..s.len()-1].parse::(){ + Ok(Self::Upload(asset_id)) }else{ - if let Ok(asset_id)=s[..s.len()-1].parse::(){ - Ok(Self::Upload(asset_id)) - }else{ - Err(ParseUploadActionErr) - } + Err(ParseUploadActionErr) } } }