Fixed code quality issues

This commit is contained in:
ninefox 2022-01-18 21:14:27 -08:00
parent 8ca627342a
commit 973b392e38

View File

@ -431,9 +431,9 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
| (Slot::Equip(slot::EquipSlot::Lantern), Slot::Inventory(inv_slot)) = (a, b)
{
if let Some(comp::item::ItemKind::Lantern(lantern)) =
inventory.get(inv_slot).and_then(|item| Some(item.kind()))
inventory.get(inv_slot).map(|item| item.kind())
{
swap_lantern(&mut ecs.write_storage(), entity, &lantern);
swap_lantern(&mut ecs.write_storage(), entity, lantern);
}
}