From ec6a06f712fee0a4d0bc6a272093af2e7a07ada2 Mon Sep 17 00:00:00 2001 From: alessandrokonrad Date: Mon, 20 Jan 2025 14:38:53 +0100 Subject: [PATCH] refactor --- .../libs/lucid_core/pkg/lucid_core_bg.wasm | Bin 1939321 -> 1939321 bytes .../lucid_core/src/instruction_builder.rs | 14 ++++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/libs/lucid_core/pkg/lucid_core_bg.wasm b/src/core/libs/lucid_core/pkg/lucid_core_bg.wasm index 919dd22b24c039e2403dfef7857aa99c95abb356..5789bb627f9f0020ee08b52426ff802636a7d927 100644 GIT binary patch delta 984 zcmZ9~Juib%6bJBArRv>NZ`WH9BBG+|CF(7b>Oj(g2qG8|u^5Dem>!8EK7l;(4Gdxs ziOpnS5n({0EP{!}(5i-i6V>x{xM_a>b8?@1dv5q}Equ7P$reswE2nZA+c=%=oWYr# z#o3(0xtz!Otg(X&xR8sum`je;!Lw)1PSi<6)phw)hTnO(Uw8%16<$3FKC9INi{BUt zsda5Pg{VuE_l^6Is?jU0L|zd)VZX2!cET2s`TjEO_z66_H5Ww=*(1@0j- zHo|H_Kf_L~qIeGbgfHM?;mf4{Yq(L=Z{QZ;E4V}W7H&^ir#l3$L_iPb1_~zCUvc_? z=zoJ_Gl}2cnP$FF72G81E;uoaS|T?Bd4SHO4aSY1FV&`fq?#}KZ45+|Tf0KsEVh3# zwj!#{^MF{skRUuH+QKkq@PFzr<29llb+^qts&05twDrNUClSBwG~6IO1J?^5!SX4b zCixl`)7R+*!Gzf09i9^Yfro{y=|rQ#c38gYFXLAm_IhQ@0$N5~qg@|Iz@R;2i{eMS#Brl5V02?5blD@V4KJW{xa+)bo6 z!fL@h!A>orcnbFkpTPyf=L!9naIL6c!Og-KaGP)dZjIZdYXo)ifP&Tr3MJH^aQYF^ z{|rZG61% { for utxo in utxos { - match (&utxo.datum_hash, &utxo.datum) { - (Some(_), Some(data)) => self.add_data(data)?, - _ => (), - }; + if let (Some(_), Some(data)) = (&utxo.datum_hash, &utxo.datum) { + self.add_data(data)?; + } match &utxo.script_ref { Some(script) => { self.add_language_or_keys(script)?; @@ -596,10 +595,9 @@ impl InstructionBuilder { } fn add_input(&mut self, utxo: Utxo, redeemer: Option) -> CoreResult<()> { - match (&utxo.datum_hash, &utxo.datum) { - (Some(_), Some(data)) => self.add_data(data)?, - _ => (), - }; + if let (Some(_), Some(data)) = (&utxo.datum_hash, &utxo.datum) { + self.add_data(data)?; + } match &utxo.script_ref { Some(script) => { self.add_language_or_keys(script)?;