mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removes most unused imports; changes some unused variables to underscores or provides a leading underscore; removes some unnecessary variables and mutable declarations; and performs other miscellaneous warning fixes.
This commit is contained in:
@ -3,12 +3,10 @@ mod start_singleplayer;
|
||||
mod ui;
|
||||
|
||||
use super::char_selection::CharSelectionState;
|
||||
use crate::{
|
||||
window::{Event, Window},
|
||||
Direction, GlobalState, PlayState, PlayStateResult,
|
||||
};
|
||||
use crate::{window::Event, Direction, GlobalState, PlayState, PlayStateResult};
|
||||
use client_init::{ClientInit, Error as InitError};
|
||||
use common::{clock::Clock, comp};
|
||||
use log::warn;
|
||||
use start_singleplayer::StartSingleplayerState;
|
||||
use std::time::Duration;
|
||||
use ui::{Event as MainMenuEvent, MainMenuUi};
|
||||
@ -101,8 +99,9 @@ impl PlayState for MainMenuState {
|
||||
if !net_settings.servers.contains(&server_address) {
|
||||
net_settings.servers.push(server_address.clone());
|
||||
}
|
||||
// TODO: Handle this result.
|
||||
global_state.settings.save_to_file();
|
||||
if let Err(err) = global_state.settings.save_to_file() {
|
||||
warn!("Failed to save settings: {:?}", err);
|
||||
}
|
||||
// Don't try to connect if there is already a connection in progress.
|
||||
client_init = client_init.or(Some(ClientInit::new(
|
||||
(server_address, DEFAULT_PORT, false),
|
||||
|
Reference in New Issue
Block a user