From 3c5f5c7496d31ec66465fae2a85fc4ac2ed0b144 Mon Sep 17 00:00:00 2001 From: Alula Date: Sat, 19 Dec 2020 17:30:27 +0100 Subject: [PATCH] get_weapon_type_mut -> get_weapon_by_type_mut --- src/inventory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inventory.rs b/src/inventory.rs index 6cfa523..825d029 100644 --- a/src/inventory.rs +++ b/src/inventory.rs @@ -110,7 +110,7 @@ impl Inventory { self.weapons.get(idx) } - pub fn get_weapon_type_mut(&mut self, wtype: WeaponType) -> Option<&mut Weapon> { + pub fn get_weapon_by_type_mut(&mut self, wtype: WeaponType) -> Option<&mut Weapon> { self.weapons.iter_mut().find(|weapon| weapon.wtype == wtype) }