From 68b7f746ae5155c2b50938724ef7347246b3ea0b Mon Sep 17 00:00:00 2001 From: Gabriel Lopez Date: Mon, 15 Apr 2024 16:48:32 -0500 Subject: [PATCH] Clippy fix --- contracts/external/cw-abc/src/commands.rs | 29 +++++++++++------------ 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/contracts/external/cw-abc/src/commands.rs b/contracts/external/cw-abc/src/commands.rs index 1f74ec1e6..78335b432 100644 --- a/contracts/external/cw-abc/src/commands.rs +++ b/contracts/external/cw-abc/src/commands.rs @@ -418,27 +418,26 @@ fn is_allowlisted_through_daos( storage: &dyn Storage, hatcher: &Addr, ) -> bool { - for result in hatcher_allowlist() + for (dao, _) in hatcher_allowlist() .idx .config_type .prefix(HatcherAllowlistConfigType::DAO {}.to_string()) .range(storage, None, None, cosmwasm_std::Order::Ascending) + .flatten() { - if let Ok((dao, _)) = result { - let voting_power_response_result: StdResult< - dao_interface::voting::VotingPowerAtHeightResponse, - > = querier.query_wasm_smart( - dao, - &dao_interface::msg::QueryMsg::VotingPowerAtHeight { - address: hatcher.to_string(), - height: None, - }, - ); + let voting_power_response_result: StdResult< + dao_interface::voting::VotingPowerAtHeightResponse, + > = querier.query_wasm_smart( + dao, + &dao_interface::msg::QueryMsg::VotingPowerAtHeight { + address: hatcher.to_string(), + height: None, + }, + ); - if let Ok(voting_power_response) = voting_power_response_result { - if voting_power_response.power > Uint128::zero() { - return true; - } + if let Ok(voting_power_response) = voting_power_response_result { + if voting_power_response.power > Uint128::zero() { + return true; } } }