Minor config file handling cleanup

This commit is contained in:
Ignotus Peverell 2018-05-22 19:01:16 +01:00
parent 90746537a3
commit f3fffa142f
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -105,15 +105,10 @@ impl GlobalConfig {
}
// Config file path is given but not valid
if !return_value.config_file_path.as_mut().unwrap().exists() {
let config_file = return_value.config_file_path.clone().unwrap();
if !config_file.exists() {
return Err(ConfigError::FileNotFoundError(String::from(
return_value
.config_file_path
.as_mut()
.unwrap()
.to_str()
.unwrap()
.clone(),
config_file.to_str().unwrap()
)));
}