From 076a65119978b05e8778f0ae8a33501d20fa0ed8 Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Mon, 13 Jun 2022 10:14:13 +0100 Subject: [PATCH] Fix clippy warnings in tests --- common/types/src/currency.rs | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/common/types/src/currency.rs b/common/types/src/currency.rs index 568b9ed3b8..8c502171a8 100644 --- a/common/types/src/currency.rs +++ b/common/types/src/currency.rs @@ -317,7 +317,6 @@ mod test { use cosmwasm_std::Coin as CosmWasmCoin; use cosmwasm_std::Decimal as CosmWasmDecimal; use serde_json::json; - use std::convert::TryFrom; use std::str::FromStr; use std::string::ToString; @@ -424,9 +423,7 @@ mod test { }; println!( "from_atomics = {}", - CosmWasmDecimal::from_atomics(coin.amount.clone(), 6) - .unwrap() - .to_string() + CosmWasmDecimal::from_atomics(coin.amount, 6).unwrap() ); let c: MajorCurrencyAmount = coin.into(); assert_eq!(c, MajorCurrencyAmount::new("0.000001", CurrencyDenom::Nym)); @@ -440,7 +437,7 @@ mod test { }; println!( "from_atomics = {:?}", - CosmWasmDecimal::from_atomics(coin.amount.clone(), 6) + CosmWasmDecimal::from_atomics(coin.amount, 6) .unwrap() .to_string() ); @@ -489,27 +486,4 @@ mod test { let denom = c.denom.to_string(); assert_eq!(denom, "NYM".to_string()); } - - fn amounts() -> Vec<&'static str> { - vec![ - "1", - "10", - "100", - "1000", - "10000", - "100000", - "10000000", - "100000000", - "1000000000", - "10000000000", - "100000000000", - "1000000000000", - "10000000000000", - "100000000000000", - "1000000000000000", - "10000000000000000", - "100000000000000000", - "1000000000000000000", - ] - } }