1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-09-28 13:09:07 +00:00

get_weapon_type_mut -> get_weapon_by_type_mut

This commit is contained in:
Alula 2020-12-19 17:30:27 +01:00
parent 87591f4a3d
commit 3c5f5c7496
No known key found for this signature in database
GPG key ID: 3E00485503A1D8BA

View file

@ -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)
}