diff -r 25c564f77b7d -r 216d39de1a44 rust/hedgewars-server/src/server/core.rs --- a/rust/hedgewars-server/src/server/core.rs Thu Feb 07 17:17:42 2019 +0300 +++ b/rust/hedgewars-server/src/server/core.rs Thu Feb 07 18:04:53 2019 +0300 @@ -19,8 +19,8 @@ pub struct HWAnteClient { pub nick: Option, pub protocol_number: Option, + pub web_password: Option, pub server_salt: String, - pub web_password: String, } pub struct HWAnteroom { @@ -38,17 +38,15 @@ nick: None, protocol_number: None, server_salt: salt, - web_password: "".to_string(), + web_password: None, }; self.clients.insert(client_id, client); } pub fn remove_client(&mut self, client_id: ClientId) -> Option { let mut client = self.clients.remove(client_id); - if let Some(ref mut client) = client { - client - .web_password - .replace_range(.., "🦔🦔🦔🦔🦔🦔🦔🦔"); + if let Some(HWAnteClient { web_password: Some(ref mut password), ..}) = client { + password.replace_range(.., "🦔🦔🦔🦔🦔🦔🦔🦔"); } client }