Show More
@@ -545,13 +545,15 struct SubCommand { | |||||
545 | } |
|
545 | } | |
546 |
|
546 | |||
547 | macro_rules! subcommand { |
|
547 | macro_rules! subcommand { | |
548 | ($command: ident) => { |
|
548 | ($command: ident) => {{ | |
|
549 | let args = commands::$command::args(); | |||
|
550 | let name = args.get_name().to_string(); | |||
549 | SubCommand { |
|
551 | SubCommand { | |
550 | args: commands::$command::args(), |
|
552 | args, | |
551 | run: commands::$command::run, |
|
553 | run: commands::$command::run, | |
552 | name: stringify!($command).to_string(), |
|
554 | name, | |
553 | } |
|
555 | } | |
554 | }; |
|
556 | }}; | |
555 | } |
|
557 | } | |
556 | fn subcommands() -> Vec<SubCommand> { |
|
558 | fn subcommands() -> Vec<SubCommand> { | |
557 | vec![ |
|
559 | vec![ |
General Comments 0
You need to be logged in to leave comments.
Login now