From 47e4f7c9dd41caf5e6118419fbc12eca61090466 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 7 Jan 2020 12:12:27 +0000 Subject: 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. --- src/arg_util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/arg_util.rs b/src/arg_util.rs index d54dd94..b040e0d 100644 --- a/src/arg_util.rs +++ b/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, -- cgit v1.2.3