From 929275b7abda0939eb49e99087af44444bad0a33 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 7 Jan 2020 12:22:36 +0000 Subject: Use strings instead of Command variants In one of the next patches, we will add fields to some Command variants to be able to use them with structopt. Then we will no longer be able to instantiate them directly, so we replace these instances for the transition. This patch also removes the cmd_help! macro that is no longer needed. --- nitrocli/src/arg_util.rs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'nitrocli/src/arg_util.rs') diff --git a/nitrocli/src/arg_util.rs b/nitrocli/src/arg_util.rs index 5980f48..fe755f3 100644 --- a/nitrocli/src/arg_util.rs +++ b/nitrocli/src/arg_util.rs @@ -147,19 +147,6 @@ macro_rules! fmt_enum { }}; } -/// A macro for generating the help text for a command/subcommand. The -/// argument is the variable representing the command (which in turn is -/// an enum). -/// Note that the name of this variable is embedded into the help text! -macro_rules! cmd_help { - ( $cmd:ident ) => { - format!( - concat!("The ", stringify!($cmd), " to execute ({})"), - fmt_enum!($cmd) - ) - }; -} - #[cfg(test)] mod tests { Enum! {Command, [ -- cgit v1.2.1