Skip to content

Commit

Permalink
Derive structopt::StructOpt in Command!
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
robinkrahl authored and d-e-s-o committed Jan 7, 2020
1 parent ddd3482 commit 47e4f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arg_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 47e4f7c

Please sign in to comment.