From 080444fc8bd153efab0569d6c2679518a9d56bce Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Mon, 31 Jan 2022 22:19:21 +0100 Subject: [PATCH] juliancoffee prefers this style --- common/src/comp/inventory/trade_pricing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/comp/inventory/trade_pricing.rs b/common/src/comp/inventory/trade_pricing.rs index 15a2b34312..0090d4f395 100644 --- a/common/src/comp/inventory/trade_pricing.rs +++ b/common/src/comp/inventory/trade_pricing.rs @@ -99,7 +99,7 @@ impl From)>> for ProbabilityFile { let rescale = if content.is_empty() { 1.0 } else { - 1.0 / content.iter().fold(0.0, |s, e| s + e.0) + 1.0 / content.iter().map(|e| e.0).sum::() }; Self { content: content