From 9a72e98322894eb2e9bf889c65bd8fa07d662145 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 2 Jun 2021 01:12:38 +0100 Subject: [PATCH] otter cli: Make ordinary_subcommand handle SubcommandProperties Signed-off-by: Ian Jackson --- src/bin/otter.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index d791060d..e106610a 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -779,7 +779,15 @@ macro_rules! ordinary_subcmd { call, props: default(), }} - } + }; + {$verb:expr, $help:expr, $($prop:tt)+} => { + inventory::submit!{Subcommand { + verb: $verb, + help: $help, + call, + props: SubcommandProperties { $($prop)* ..default() }, + }} + }; } //---------- list-games ---------- -- 2.30.2