From 67e96d33db36e9d0fe0daf157cb5068fa1706202 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 28 Oct 2020 20:12:42 -0300 Subject: [PATCH] why did i shuffle this --- src/ship/items/inventory.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ship/items/inventory.rs b/src/ship/items/inventory.rs index 763f0a7..8094216 100644 --- a/src/ship/items/inventory.rs +++ b/src/ship/items/inventory.rs @@ -422,9 +422,13 @@ impl CharacterInventory { let (slot, _) = self.items.iter() .enumerate() .filter(|(_, item)| { - if let InventoryItem::Individual(individual_inventory_item) = item {if let ItemDetail::Armor(_) = &individual_inventory_item.item {return individual_inventory_item.equipped }} + if let InventoryItem::Individual(individual_inventory_item) = item { + if let ItemDetail::Armor(_) = &individual_inventory_item.item { + return individual_inventory_item.equipped + } + } false - }) + }) .nth(0)?; Some(InventoryItemHandle { inventory: self,