refactor: move config defaults from TOML files to Default trait (#352)

This commit is contained in:
Sanchith Hegde
2023-01-17 19:13:16 +05:30
committed by GitHub
parent 4f6a8fcd9d
commit beb0384047
20 changed files with 589 additions and 169 deletions

View File

@ -9,6 +9,9 @@ async fn main() -> DrainerResult<()> {
#[allow(clippy::expect_used)]
let conf = settings::Settings::with_config_path(cmd_line.config_path)
.expect("Unable to construct application configuration");
#[allow(clippy::expect_used)]
conf.validate()
.expect("Failed to validate drainer configuration");
let store = services::Store::new(&conf, false).await;
let store = std::sync::Arc::new(store);