diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-01-07 12:12:27 +0000 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2020-01-08 09:20:56 -0800 |
commit | 375843adeca03daaa3e8ad1d91712b05785fff66 (patch) | |
tree | 58159b2c7164e0fe2ec967c58ec1cff0527bf8a2 | |
parent | aa1f893dbe2f48c7a643c15db35802440664f60b (diff) | |
download | nitrocli-375843adeca03daaa3e8ad1d91712b05785fff66.tar.gz nitrocli-375843adeca03daaa3e8ad1d91712b05785fff66.tar.bz2 |
Derive structopt::StructOpt in Command!
As a preparation for the structopt transition, we derive StructOpt for
the enums generated by Command! so that they can be used as a
subcommand.
-rw-r--r-- | nitrocli/src/arg_util.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nitrocli/src/arg_util.rs b/nitrocli/src/arg_util.rs index 075dc6d..54c1fce 100644 --- a/nitrocli/src/arg_util.rs +++ b/nitrocli/src/arg_util.rs @@ -80,7 +80,7 @@ macro_rules! Command { impl_default!($name => $( $name::$var(::std::default::Default::default()) , )*); }; ( $name:ident, [ $( $var:ident => ($str:expr, $exec:expr), ) *] ) => { - #[derive(Debug, PartialEq)] + #[derive(Debug, PartialEq, ::structopt::StructOpt)] pub enum $name { $( $var, |