From 21b1e29f0951db3574ffe714c06f3fcc5cd28d51 Mon Sep 17 00:00:00 2001 From: microproofs Date: Wed, 27 Mar 2024 16:39:52 -0400 Subject: [PATCH] chore: clippy fix --- crates/uplc/src/optimize/shrinker.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/uplc/src/optimize/shrinker.rs b/crates/uplc/src/optimize/shrinker.rs index 721a6558..ec29a7a3 100644 --- a/crates/uplc/src/optimize/shrinker.rs +++ b/crates/uplc/src/optimize/shrinker.rs @@ -520,9 +520,7 @@ impl CurriedArgs { fn get_id_args(&self, path: &BuiltinArgs) -> Option> { match (self, path) { (CurriedArgs::TwoArgs { fst_args, snd_args }, BuiltinArgs::TwoArgs { fst, snd }) => { - let Some(arg) = fst_args.iter().find(|item| fst.1 == item.term) else { - return None; - }; + let arg = fst_args.iter().find(|item| fst.1 == item.term)?; let Some(arg2) = snd_args.iter().find(|item| match snd { Some(snd) => item.term == snd.1, @@ -609,9 +607,7 @@ impl CurriedArgs { }, BuiltinArgs::ThreeArgs { fst, snd, thd }, ) => { - let Some(arg) = fst_args.iter().find(|item| fst.1 == item.term) else { - return None; - }; + let arg = fst_args.iter().find(|item| fst.1 == item.term)?; let Some(arg2) = snd_args.iter().find(|item| match snd { Some(snd) => item.term == snd.1,