Minify mapping
This commit is contained in:
parent
e5fa71d1e7
commit
eff4f547ba
|
@ -135,23 +135,21 @@ impl Configuration {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.map(|(k, v)| {
|
.map(|(k, v)| self
|
||||||
self.config
|
.config
|
||||||
.read(&k[..])
|
.read(&k[..])
|
||||||
.map_err_into(CEK::TOMLParserError)
|
.map_err_into(CEK::TOMLParserError)
|
||||||
.map(|toml| match toml {
|
.map(|toml| match toml {
|
||||||
Some(value) => {
|
Some(value) => match into_value(value, v) {
|
||||||
match into_value(value, v) {
|
Some(v) => {
|
||||||
Some(v) => {
|
info!("Successfully overridden: {} = {}", k, v);
|
||||||
info!("Successfully overridden: {} = {}", k, v);
|
Ok(v)
|
||||||
Ok(v)
|
|
||||||
},
|
|
||||||
None => Err(CEK::ConfigOverrideTypeNotMatching.into_error()),
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
None => Err(CEK::ConfigOverrideKeyNotAvailable.into_error()),
|
None => Err(CEK::ConfigOverrideTypeNotMatching.into_error()),
|
||||||
})
|
},
|
||||||
})
|
None => Err(CEK::ConfigOverrideKeyNotAvailable.into_error()),
|
||||||
|
})
|
||||||
|
)
|
||||||
.fold_result(|i| i)
|
.fold_result(|i| i)
|
||||||
.map_err(Box::new)
|
.map_err(Box::new)
|
||||||
.map_err(|e| CEK::ConfigOverrideError.into_error_with_cause(e))
|
.map_err(|e| CEK::ConfigOverrideError.into_error_with_cause(e))
|
||||||
|
|
Loading…
Reference in New Issue