diff --git a/src/config/toml.rs b/src/config/toml.rs index d10d269..2edc0fa 100644 --- a/src/config/toml.rs +++ b/src/config/toml.rs @@ -44,9 +44,9 @@ fn toml() -> Result { let file_dir: String = String::from(config_dir.to_string_lossy()) + CONFIG_DIR; - let toml_str = read_to_string(file_dir).map_err(|e| e)?; + let toml_str = read_to_string(file_dir).map_err(Error::new)?; - let decode = from_str(&toml_str).map_err(|e| e)?; + let decode = from_str(&toml_str).map_err(Error::new)?; Ok(decode) }