Skip to content
Snippets Groups Projects
Verified Commit 34c0ca96 authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

style(config): Run cargo fmt

parent 269162bc
No related branches found
No related tags found
No related merge requests found
Pipeline #228 passed
......@@ -135,7 +135,10 @@ pub fn from_default_paths<P: AsRef<Path>, C: DeserializeOwned>(
let mut paths = as_paths(additional_paths);
paths.push((get_current_dir_config_path(&format)?, Some(format.clone())));
paths.push((get_name_config_path(application_name, &format), Some(format)));
paths.push((
get_name_config_path(application_name, &format),
Some(format),
));
from_paths(paths)
}
......@@ -152,7 +155,10 @@ pub fn from_defaults<P: AsRef<Path>, C: DeserializeOwned + Default + Serialize>(
let mut paths = as_paths(additional_paths);
paths.push((get_current_dir_config_path(&format)?, Some(format.clone())));
paths.push((get_name_config_path(application_name, &format), Some(format)));
paths.push((
get_name_config_path(application_name, &format),
Some(format),
));
let default_config: C = Default::default();
let figment = Figment::from(Serialized::from(default_config, Profile::default()));
......@@ -166,8 +172,7 @@ pub fn from_defaults<P: AsRef<Path>, C: DeserializeOwned + Default + Serialize>(
debug!("Using env prefix: {}", &env_prefix);
extract(figment
.merge(Env::prefixed(&env_prefix)))
extract(figment.merge(Env::prefixed(&env_prefix)))
}
fn as_paths<P: AsRef<Path>>(
......@@ -231,4 +236,4 @@ fn extract<C: DeserializeOwned>(figment: Figment) -> Result<C, ConfigError> {
figment
.extract()
.map_err(|source| ConfigError::ExtractConfig { source })
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment