mirror of
https://github.com/Start9Labs/rpc-toolkit.git
synced 2026-03-30 04:11:58 +00:00
aliases
This commit is contained in:
@@ -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);
|
||||
)*
|
||||
|
||||
Reference in New Issue
Block a user