Skip to content
Snippets Groups Projects
Commit afa64bf3 authored by Ian Jackson's avatar Ian Jackson
Browse files

config defaults: No longer apply ARTI_DEFAULTS in load()

This is redundant, because the defaults have to be supplied by the
config builders (usually via builder default attributes).

That this is actually done and correct is tested by the
`default_config()` test case in arti/src/cfg.rs.
parent 58f53bae
No related branches found
No related tags found
No related merge requests found
......@@ -169,10 +169,6 @@ impl ConfigurationSources {
/// Load the configuration into a new [`config::Config`].
pub fn load(&self) -> Result<config::Config, config::ConfigError> {
let mut builder = config::Config::builder();
builder = builder.add_source(config::File::from_str(
options::ARTI_DEFAULTS,
config::FileFormat::Toml,
));
builder = add_sources(builder, &self.files, &self.options);
builder.build()
}
......
......@@ -197,7 +197,6 @@ mod test {
#[test]
fn default_config() {
// TODO: this is duplicate code.
let cfg = config::Config::builder()
.add_source(config::File::from_str(
ARTI_DEFAULTS,
......
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