From 0c8d64463aa881c2923f9e9d629a139d12b7dc06 Mon Sep 17 00:00:00 2001 From: Sergey Ratiashvili Date: Thu, 4 Jul 2024 13:21:28 +0200 Subject: [PATCH] fix: clippy --- contracts/core/src/contract.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/contracts/core/src/contract.rs b/contracts/core/src/contract.rs index 4b9cee07..8164cc52 100644 --- a/contracts/core/src/contract.rs +++ b/contracts/core/src/contract.rs @@ -780,23 +780,22 @@ fn execute_tick_peripheral( ) -> ContractResult> { let mut attrs = vec![attr("action", "tick_peripheral"), attr("knot", "001")]; let res = get_received_puppeteer_response(deps.as_ref())?; - match res { - drop_puppeteer_base::msg::ResponseHookMsg::Success(msg) => match msg.transaction { + + if let drop_puppeteer_base::msg::ResponseHookMsg::Success(msg) = res { + match msg.transaction { drop_puppeteer_base::msg::Transaction::RedeemShares { .. } => { attrs.push(attr("knot", "038")) } - drop_puppeteer_base::msg::Transaction::IBCTransfer { reason, .. } => match reason { - IBCTransferReason::LSMShare => { + drop_puppeteer_base::msg::Transaction::IBCTransfer { reason, .. } => { + if reason == IBCTransferReason::LSMShare { attrs.push(attr("knot", "043")); } - _ => {} - }, + } drop_puppeteer_base::msg::Transaction::Transfer { .. } => { attrs.push(attr("knot", "035")); } _ => {} - }, - _ => {} + } } LAST_PUPPETEER_RESPONSE.remove(deps.storage); FSM.go_to(deps.storage, ContractState::Idle)?;