This commit is contained in:
Aiden McClelland
2021-04-12 15:02:02 -06:00
parent cd38fbd58d
commit fba286e7a8
4 changed files with 31 additions and 0 deletions

View File

@@ -98,12 +98,16 @@ fn build_app(name: LitStr, opt: &mut Options, params: &mut [ParamType]) -> Token
})
.collect::<Vec<_>>();
let required = LitBool::new(subcommand_required, Span::call_site());
let alias = &opt.common().aliases;
quote! {
pub fn build_app() -> rpc_toolkit_prelude::App<'static, 'static> {
let mut app = rpc_toolkit_prelude::App::new(#name);
#(
app = app.about(#about);
)*
#(
app = app.alias(#alias);
)*
#(
app = app.arg(#arg);
)*