diff --git a/zebrad/src/commands/config.rs b/zebrad/src/commands/config.rs index 730af4d0..3716babc 100644 --- a/zebrad/src/commands/config.rs +++ b/zebrad/src/commands/config.rs @@ -28,7 +28,10 @@ impl Runnable for ConfigCmd { " .to_owned(); // The default name and location of the config file is defined in ../commands.rs - output += &toml::to_string_pretty(&default_config) + // this avoids a ValueAfterTable error + // https://github.com/alexcrichton/toml-rs/issues/145 + let conf = toml::Value::try_from(default_config).unwrap(); + output += &toml::to_string_pretty(&conf) .expect("default config should be serializable"); match self.output_file { Some(ref output_file) => {