From f3fffa142feee3d7c2de6d12300d1b66c55fa9b9 Mon Sep 17 00:00:00 2001 From: Ignotus Peverell Date: Tue, 22 May 2018 19:01:16 +0100 Subject: [PATCH] Minor config file handling cleanup --- config/src/config.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/config/src/config.rs b/config/src/config.rs index 8db451928..404d79a8b 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -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() ))); }