fix name shadowing
This commit is contained in:
parent
cae89cd2ac
commit
66d25ed155
@ -205,14 +205,14 @@ impl EntityGateway for InMemoryGateway {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_items_by_character(&self, character_id: &CharacterEntityId) -> Result<Vec<ItemEntity>, GatewayError> {
|
async fn get_items_by_character(&self, char_id: &CharacterEntityId) -> Result<Vec<ItemEntity>, GatewayError> {
|
||||||
let items = self.items.lock().unwrap();
|
let items = self.items.lock().unwrap();
|
||||||
Ok(items
|
Ok(items
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|(_, k)| {
|
.filter(|(_, k)| {
|
||||||
match k.location {
|
match k.location {
|
||||||
ItemLocation::Inventory{character_id, ..} => character_id == character_id,
|
ItemLocation::Inventory{character_id, ..} => character_id == *char_id,
|
||||||
ItemLocation::Bank{character_id, ..} => character_id == character_id,
|
ItemLocation::Bank{character_id, ..} => character_id == *char_id,
|
||||||
_ => false
|
_ => false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user