From 66d25ed15533a80f65dba1ebfe628bb40477af7f Mon Sep 17 00:00:00 2001 From: jake Date: Thu, 29 Oct 2020 19:40:43 -0600 Subject: [PATCH] fix name shadowing --- src/entity/gateway/inmemory.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entity/gateway/inmemory.rs b/src/entity/gateway/inmemory.rs index 12d25e7..602d869 100644 --- a/src/entity/gateway/inmemory.rs +++ b/src/entity/gateway/inmemory.rs @@ -205,14 +205,14 @@ impl EntityGateway for InMemoryGateway { Ok(()) } - async fn get_items_by_character(&self, character_id: &CharacterEntityId) -> Result, GatewayError> { + async fn get_items_by_character(&self, char_id: &CharacterEntityId) -> Result, GatewayError> { let items = self.items.lock().unwrap(); Ok(items .iter() .filter(|(_, k)| { match k.location { - ItemLocation::Inventory{character_id, ..} => character_id == character_id, - ItemLocation::Bank{character_id, ..} => character_id == character_id, + ItemLocation::Inventory{character_id, ..} => character_id == *char_id, + ItemLocation::Bank{character_id, ..} => character_id == *char_id, _ => false } })