code style fixes and nesting fixes
All checks were successful
Version Check / check-version (pull_request) Successful in 3s
All checks were successful
Version Check / check-version (pull_request) Successful in 3s
This commit is contained in:
@@ -162,13 +162,11 @@ pub fn load_config() -> Config {
|
||||
config_dir.push("mould");
|
||||
config_dir.push("config.toml");
|
||||
|
||||
if config_dir.exists() {
|
||||
if let Ok(content) = fs::read_to_string(config_dir) {
|
||||
if let Ok(config) = toml::from_str(&content) {
|
||||
if config_dir.exists()
|
||||
&& let Ok(content) = fs::read_to_string(config_dir)
|
||||
&& let Ok(config) = toml::from_str(&content) {
|
||||
return config;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Config::default()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user