Fix pointer syntax

This commit is contained in:
Aleksey Kladov
2020-04-01 19:27:45 +02:00
parent 1ac345a9f6
commit 1225f719fe
2 changed files with 36 additions and 30 deletions

View File

@@ -364,10 +364,12 @@ fn loop_turn(
(Some(err), _) => {
log::error!("failed to fetch the server settings: {:?}", err)
}
(None, Some(new_config)) => {
let mut config = world_state.config.clone();
config.update(&new_config);
world_state.update_configuration(config);
(None, Some(configs)) => {
if let Some(new_config) = configs.get(0) {
let mut config = world_state.config.clone();
config.update(&new_config);
world_state.update_configuration(config);
}
}
(None, None) => {
log::error!("received empty server settings response from the client")