From d07c61d009905561ab1f15b9da71b01b9274c273 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 13 Jun 2022 23:28:58 +0000 Subject: [PATCH] based clip --- src/entity/item/unit.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/entity/item/unit.rs b/src/entity/item/unit.rs index 979fb02..ec56ae5 100644 --- a/src/entity/item/unit.rs +++ b/src/entity/item/unit.rs @@ -480,13 +480,10 @@ impl Unit { } pub fn apply_modifier(&mut self, modifier: &UnitModifier) { - match modifier { - UnitModifier::AddKill{enemy: _} => { - if let Some(kills) = self.kills { - self.kills = Some(kills + 1); - } - }, - _ => {}, + if let UnitModifier::AddKill{enemy: _} = modifier { + if let Some(kills) = self.kills { + self.kills = Some(kills + 1); + } }; } }