mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
replace one Owned reference by the normal Reference type
This commit is contained in:
parent
cea2550dde
commit
3a7835c6d0
@ -813,9 +813,9 @@ impl TradePricing {
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_materials_impl(&self, item: &ItemDefinitionIdOwned) -> Option<MaterialUse> {
|
fn get_materials_impl(&self, item: &ItemDefinitionId) -> Option<MaterialUse> {
|
||||||
//let tmp = format!("{:?}", item);
|
//let tmp = format!("{:?}", item);
|
||||||
let ret = self.price_lookup(item).cloned();
|
let ret = self.price_lookup(&item.to_owned()).cloned();
|
||||||
// match item {
|
// match item {
|
||||||
// ItemDefinitionIdOwned::Simple(id) => self.price_lookup(id).cloned(),
|
// ItemDefinitionIdOwned::Simple(id) => self.price_lookup(id).cloned(),
|
||||||
// ItemDefinitionIdOwned::Modular { components, .. } => Some(
|
// ItemDefinitionIdOwned::Modular { components, .. } => Some(
|
||||||
@ -854,7 +854,7 @@ impl TradePricing {
|
|||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn get_materials(item: &ItemDefinitionId) -> Option<MaterialUse> {
|
pub fn get_materials(item: &ItemDefinitionId) -> Option<MaterialUse> {
|
||||||
TRADE_PRICING.get_materials_impl(&item.to_owned())
|
TRADE_PRICING.get_materials_impl(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Loading…
Reference in New Issue
Block a user