Remove config override, not needed

This commit is contained in:
Deirdre Connolly 2019-11-12 16:27:35 -05:00 committed by Deirdre Connolly
parent 4923e0d783
commit fb19febe26
1 changed files with 2 additions and 18 deletions

View File

@ -83,25 +83,9 @@ impl Service<Request> for SeedService {
///
/// A DNS seeder command to spider and collect as many valid peer
/// addresses as we can.
// This is not a unit-like struct because it makes Command and Options sad.
#[derive(Command, Debug, Default, Options)]
pub struct SeedCmd {
/// Filter strings
#[options(free)]
filters: Vec<String>,
}
impl config::Override<ZebradConfig> for SeedCmd {
// Process the given command line options, overriding settings
// from a configuration file using explicit flags taken from
// command-line arguments.
fn override_config(&self, mut config: ZebradConfig) -> Result<ZebradConfig, FrameworkError> {
if !self.filters.is_empty() {
config.tracing.filter = self.filters.join(",");
}
Ok(config)
}
}
pub struct SeedCmd {}
impl Runnable for SeedCmd {
/// Start the application.