diff --git a/mm2src/coins/utxo/utxo_tests.rs b/mm2src/coins/utxo/utxo_tests.rs index a4219a031a..373fd29305 100644 --- a/mm2src/coins/utxo/utxo_tests.rs +++ b/mm2src/coins/utxo/utxo_tests.rs @@ -4000,12 +4000,9 @@ fn test_scan_for_new_addresses() { address: $address.to_string(), derivation_path: RpcDerivationPath(DerivationPath::from_str($der_path).unwrap()), chain: $chain, - balance: match $balance { - Some(balance) => { - HashMap::from([(TEST_COIN_NAME.to_string(), CoinBalance::new(BigDecimal::from(balance)))]) - }, - None => HashMap::default(), - }, + balance: $balance.map_or_else(HashMap::default, |balance| { + HashMap::from([(TEST_COIN_NAME.to_string(), CoinBalance::new(BigDecimal::from(balance)))]) + }), }); }}; }