cargo clippy
is angry
This commit is contained in:
@@ -478,19 +478,13 @@ impl Default for Advanced {
|
||||
}
|
||||
|
||||
/// Config configuration.
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
pub struct ConfigConfig {
|
||||
/// Configuration for lazymc version.
|
||||
pub version: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for ConfigConfig {
|
||||
fn default() -> Self {
|
||||
Self { version: None }
|
||||
}
|
||||
}
|
||||
|
||||
fn option_pathbuf_dot() -> Option<PathBuf> {
|
||||
Some(".".into())
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ fn rewrite_contents(contents: String, mut changes: HashMap<&str, String>) -> Opt
|
||||
}
|
||||
|
||||
// Try to split property
|
||||
let (key, value) = match line.split_once("=") {
|
||||
let (key, value) = match line.split_once('=') {
|
||||
Some(result) => result,
|
||||
None => return line,
|
||||
};
|
||||
|
@@ -157,11 +157,7 @@ async fn connect_to_server_no_timeout(
|
||||
|
||||
// Select server address to use, add magic if Forge
|
||||
let server_addr = if config.server.forge {
|
||||
format!(
|
||||
"{}{}",
|
||||
config.server.address.ip().to_string(),
|
||||
forge::STATUS_MAGIC,
|
||||
)
|
||||
format!("{}{}", config.server.address.ip(), forge::STATUS_MAGIC,)
|
||||
} else {
|
||||
config.server.address.ip().to_string()
|
||||
};
|
||||
|
@@ -151,10 +151,9 @@ fn reload_whitelist(config: &Config, server: &Server, dir: &Path) {
|
||||
}
|
||||
|
||||
// Must be enabled in server.properties
|
||||
let enabled =
|
||||
server_properties::read_property(&dir.join(server_properties::FILE), "white-list")
|
||||
.map(|v| v.trim() == "true")
|
||||
.unwrap_or(false);
|
||||
let enabled = server_properties::read_property(dir.join(server_properties::FILE), "white-list")
|
||||
.map(|v| v.trim() == "true")
|
||||
.unwrap_or(false);
|
||||
if !enabled {
|
||||
server.set_whitelist_blocking(None);
|
||||
debug!(target: "lazymc", "Not using whitelist, not enabled in {}", server_properties::FILE);
|
||||
|
Reference in New Issue
Block a user