aboutsummaryrefslogtreecommitdiff
path: root/src/arg_util.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-07 12:22:36 +0000
committerDaniel Mueller <deso@posteo.net>2020-01-07 12:22:36 +0000
commitd7f1557f103dfa9c6eea644517e42161cbd6b11f (patch)
tree94a9e062008b0066b42fbd2dcb39425c84942d5c /src/arg_util.rs
parent31a0cb956c7c4d8a0fb895506cc5a4a89309bdfd (diff)
downloadnitrocli-d7f1557f103dfa9c6eea644517e42161cbd6b11f.tar.gz
nitrocli-d7f1557f103dfa9c6eea644517e42161cbd6b11f.tar.bz2
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.
Diffstat (limited to 'src/arg_util.rs')
-rw-r--r--src/arg_util.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/arg_util.rs b/src/arg_util.rs
index b96f653..6d1bc50 100644
--- a/src/arg_util.rs
+++ b/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, [