From 2d5f851252fa9c78cbac1846b48a8307c75b48e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 27 Oct 2022 10:47:13 +0100 Subject: [PATCH] Workaround for clippy #9612 issue --- .../mixnet-contract/src/rewarding/simulator/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs index 5808bbbe64..62352a5b7f 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/rewarding/simulator/mod.rs @@ -228,6 +228,10 @@ mod tests { use cosmwasm_std::testing::mock_env; use std::time::Duration; + // explicitly marking this as part of #[allow(clippy::unwrap_used)] until + // https://github.com/rust-lang/rust-clippy/pull/9686 + // is merged into a release + #[allow(clippy::unwrap_used)] fn base_simulator(initial_pledge: u128) -> Simulator { let profit_margin = Percent::from_percentage_value(10).unwrap(); let interval_operating_cost = Coin::new(40_000_000, "unym"); @@ -273,6 +277,11 @@ mod tests { } // essentially our delegations + estimated rewards HAVE TO equal to what we actually determined + // + // explicitly marking this as part of #[allow(clippy::unwrap_used)] until + // https://github.com/rust-lang/rust-clippy/pull/9686 + // is merged into a release + #[allow(clippy::unwrap_used)] fn check_rewarding_invariant(simulator: &Simulator) { for node in simulator.nodes.values() { let delegation_sum: Decimal = node