From 1d9787402c59b53d931b1fb84a515c413de8aca0 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 11 Oct 2023 19:16:04 -0300 Subject: [PATCH] random mut warnings --- src/login/character.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/login/character.rs b/src/login/character.rs index f23beea..ec5db84 100644 --- a/src/login/character.rs +++ b/src/login/character.rs @@ -484,7 +484,7 @@ impl CharacterServerState { async fn set_flag(&mut self, id: ClientId, setflag: &SetFlag) -> Result, anyhow::Error> { let mut client = self.clients.write().await; let client = client.get_mut(&id).ok_or_else(|| CharacterError::ClientNotFound(id))?; - let mut user = client.user.as_mut().unwrap(); + let user = client.user.as_mut().unwrap(); user.flags = setflag.flags; self.entity_gateway.save_user(user).await.unwrap(); Ok(None.into_iter()) @@ -515,7 +515,7 @@ impl CharacterServerState { async fn character_preview(&mut self, id: ClientId, preview: &CharacterPreview) -> Result, anyhow::Error> { let mut client = self.clients.write().await; let client = client.get_mut(&id).ok_or_else(|| CharacterError::ClientNotFound(id))?; - let mut user = client.user.as_mut().unwrap(); + let user = client.user.as_mut().unwrap(); if user.flags == USERFLAG_NEWCHAR { new_character(&mut self.entity_gateway, user, preview).await? }