From b8f174ee3a102c68730f0c2321e09e50bfe50c17 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Thu, 18 Jun 2020 15:38:46 -0300 Subject: [PATCH] change config module to generate --- zebrad/src/commands.rs | 8 ++++---- zebrad/src/commands/{config.rs => generate.rs} | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) rename zebrad/src/commands/{config.rs => generate.rs} (92%) diff --git a/zebrad/src/commands.rs b/zebrad/src/commands.rs index f7962246..20866896 100644 --- a/zebrad/src/commands.rs +++ b/zebrad/src/commands.rs @@ -1,14 +1,14 @@ //! Zebrad Subcommands -mod config; mod connect; +mod generate; mod revhex; mod seed; mod start; mod version; use self::{ - config::ConfigCmd, connect::ConnectCmd, revhex::RevhexCmd, seed::SeedCmd, start::StartCmd, + connect::ConnectCmd, generate::GenerateCmd, revhex::RevhexCmd, seed::SeedCmd, start::StartCmd, version::VersionCmd, }; use crate::config::ZebradConfig; @@ -23,9 +23,9 @@ pub const CONFIG_FILE: &str = "zebrad.toml"; /// Zebrad Subcommands #[derive(Command, Debug, Options, Runnable)] pub enum ZebradCmd { - /// The `config` subcommand + /// The `generate` subcommand #[options(help = "generate a skeleton configuration")] - Config(ConfigCmd), + Generate(GenerateCmd), /// The `connect` subcommand #[options(help = "testing stub for dumping network messages")] diff --git a/zebrad/src/commands/config.rs b/zebrad/src/commands/generate.rs similarity index 92% rename from zebrad/src/commands/config.rs rename to zebrad/src/commands/generate.rs index f54edbd4..e4631612 100644 --- a/zebrad/src/commands/config.rs +++ b/zebrad/src/commands/generate.rs @@ -1,17 +1,17 @@ -//! `config` subcommand - generates a skeleton config. +//! `generate` subcommand - generates a skeleton config. use crate::config::ZebradConfig; use abscissa_core::{Command, Options, Runnable}; -/// `config` subcommand +/// `generate` subcommand #[derive(Command, Debug, Options)] -pub struct ConfigCmd { +pub struct GenerateCmd { /// The file to write the generated config to. #[options(help = "The file to write the generated config to (stdout if unspecified)")] output_file: Option, } -impl Runnable for ConfigCmd { +impl Runnable for GenerateCmd { /// Start the application. fn run(&self) { let default_config = ZebradConfig {