|
|
@ -198,7 +198,14 @@ impl InventoryItem { |
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn individual(&mut self) -> Option<&mut IndividualInventoryItem> {
|
|
|
|
pub fn individual(&self) -> Option<&IndividualInventoryItem> {
|
|
|
|
match self {
|
|
|
|
InventoryItem::Individual(ref individual_inventory_item) => Some(individual_inventory_item),
|
|
|
|
_ => None
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn individual_mut(&mut self) -> Option<&mut IndividualInventoryItem> {
|
|
|
|
match self {
|
|
|
|
InventoryItem::Individual(ref mut individual_inventory_item) => Some(individual_inventory_item),
|
|
|
|
_ => None
|
|
|
|