From 3a7835c6d0ca099d0297352ca12405980fcfd974 Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Thu, 7 Jul 2022 00:40:35 +0200 Subject: [PATCH] replace one Owned reference by the normal Reference type --- common/src/comp/inventory/trade_pricing.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/comp/inventory/trade_pricing.rs b/common/src/comp/inventory/trade_pricing.rs index 2657a13624..597d984d41 100644 --- a/common/src/comp/inventory/trade_pricing.rs +++ b/common/src/comp/inventory/trade_pricing.rs @@ -813,9 +813,9 @@ impl TradePricing { result } - fn get_materials_impl(&self, item: &ItemDefinitionIdOwned) -> Option { + fn get_materials_impl(&self, item: &ItemDefinitionId) -> Option { //let tmp = format!("{:?}", item); - let ret = self.price_lookup(item).cloned(); + let ret = self.price_lookup(&item.to_owned()).cloned(); // match item { // ItemDefinitionIdOwned::Simple(id) => self.price_lookup(id).cloned(), // ItemDefinitionIdOwned::Modular { components, .. } => Some( @@ -854,7 +854,7 @@ impl TradePricing { #[must_use] pub fn get_materials(item: &ItemDefinitionId) -> Option { - TRADE_PRICING.get_materials_impl(&item.to_owned()) + TRADE_PRICING.get_materials_impl(item) } #[cfg(test)]