diff --git a/src/login/character.rs b/src/login/character.rs index 9b9551b..eb1cdb5 100644 --- a/src/login/character.rs +++ b/src/login/character.rs @@ -813,7 +813,7 @@ mod test { #[async_trait::async_trait] impl EntityGateway for TestData { - async fn get_user_settings_by_user(&self, user: &UserAccountEntity) -> Result { + async fn get_user_settings_by_user(&mut self, user: &UserAccountEntity) -> Result { Ok(UserSettingsEntity { id: UserSettingsId(0), user_id: user.id, @@ -869,7 +869,7 @@ mod test { #[async_std::test] async fn test_character_create() { - let test_data = InMemoryGateway::default(); + let mut test_data = InMemoryGateway::default(); let mut fake_user = ClientState::new(); fake_user.user = Some(UserAccountEntity { id: UserAccountId(3), diff --git a/src/login/login.rs b/src/login/login.rs index 8e6020f..6d73817 100644 --- a/src/login/login.rs +++ b/src/login/login.rs @@ -211,7 +211,7 @@ mod test { #[async_trait::async_trait] impl EntityGateway for TestData { - async fn get_user_by_name(&self, name: String) -> Result { + async fn get_user_by_name(&mut self, name: String) -> Result { assert!(name == "testuser"); Ok(UserAccountEntity { id: UserAccountId(1), @@ -269,7 +269,7 @@ mod test { #[async_trait::async_trait] impl EntityGateway for TestData { - async fn get_user_by_name(&self, _name: String) -> Result { + async fn get_user_by_name(&mut self, _name: String) -> Result { Err(GatewayError::Error) } } @@ -303,7 +303,7 @@ mod test { #[async_trait::async_trait] impl EntityGateway for TestData { - async fn get_user_by_name(&self, name: String) -> Result { + async fn get_user_by_name(&mut self, name: String) -> Result { assert!(name == "testuser"); Ok(UserAccountEntity { id: UserAccountId(1),