From e943d01541d1250db7f53a0aeb555a38cadad7c5 Mon Sep 17 00:00:00 2001 From: mr-t Date: Fri, 27 Sep 2024 12:27:21 +0200 Subject: [PATCH] clippy --- packages/ics721/src/ibc_packet_receive.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/ics721/src/ibc_packet_receive.rs b/packages/ics721/src/ibc_packet_receive.rs index 7180dec..77185c7 100644 --- a/packages/ics721/src/ibc_packet_receive.rs +++ b/packages/ics721/src/ibc_packet_receive.rs @@ -62,11 +62,8 @@ pub(crate) fn receive_ibc_packet( load_nft_contract_for_class_id(deps.storage, local_class_id.to_string()) .map_err(|_| ContractError::NoNftContractForClassId(local_class_id.to_string())) } else { - let nft_contract = - match query_nft_contract_for_class_id(deps.storage, local_class_id.clone()) { - Ok(nft_contract) => nft_contract, - Err(_) => None, // not found, occurs on initial transfer when we don't have the contract address - }; + let nft_contract = query_nft_contract_for_class_id(deps.storage, local_class_id.clone()) + .unwrap_or_default(); match nft_contract { Some(nft_contract) => Ok(nft_contract), None => {