From 4c76e9314d2fb57f06f70d154da265f721c3ef17 Mon Sep 17 00:00:00 2001 From: holychowders Date: Fri, 6 May 2022 15:46:09 -0500 Subject: [PATCH] Use `sum` instead of `fold`. --- common/src/combat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/combat.rs b/common/src/combat.rs index 7c57d55648..4d407478dd 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -1196,7 +1196,7 @@ pub fn stealth_multiplier_from_items(inventory: Option<&Inventory>) -> f32 { None } }) - .fold(0.0, |a, b| a + b) + .sum() }); (1.0 / (1.0 + stealth_sum)).clamp(0.0, 1.0)