diff options
Diffstat (limited to 'src/derives/into_app.rs')
-rw-r--r-- | src/derives/into_app.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/derives/into_app.rs b/src/derives/into_app.rs index eabdfa3..dfb676a 100644 --- a/src/derives/into_app.rs +++ b/src/derives/into_app.rs @@ -36,8 +36,8 @@ pub fn gen_for_struct(item: &Item, item_name: &Ident, generics: &Generics) -> To clippy::nursery, clippy::cargo, clippy::suspicious_else_formatting, + clippy::almost_swapped, )] - #[deny(clippy::correctness)] impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause { fn command<'b>() -> clap::Command { let #app_var = clap::Command::new(#name); @@ -72,8 +72,8 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, generics: &Generics) -> Toke clippy::nursery, clippy::cargo, clippy::suspicious_else_formatting, + clippy::almost_swapped, )] - #[deny(clippy::correctness)] impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause { fn command<'b>() -> clap::Command { let #app_var = clap::Command::new(#name) @@ -85,6 +85,8 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, generics: &Generics) -> Toke fn command_for_update<'b>() -> clap::Command { let #app_var = clap::Command::new(#name); <Self as clap::Subcommand>::augment_subcommands_for_update(#app_var) + .subcommand_required(false) + .arg_required_else_help(false) } } } |