Skip to content

Commit

Permalink
Merge clap-rs#3018
Browse files Browse the repository at this point in the history
3018: fix(derive): Don't emit warnings r=pksunkara a=epage



Co-authored-by: Ed Page <[email protected]>
  • Loading branch information
bors[bot] and epage authored Nov 12, 2021
2 parents 98c1a75 + 9167fde commit 4b70a6e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion clap_derive/src/derives/arg_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ pub fn gen_for_enum(name: &Ident, attrs: &[Attribute], e: &DataEnum) -> TokenStr
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::ArgEnum for #name {
Expand Down
6 changes: 4 additions & 2 deletions clap_derive/src/derives/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ pub fn gen_for_struct(
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::Args for #struct_name {
Expand Down Expand Up @@ -114,7 +115,8 @@ pub fn gen_from_arg_matches_for_struct(
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::FromArgMatches for #struct_name {
Expand Down
6 changes: 4 additions & 2 deletions clap_derive/src/derives/into_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ pub fn gen_for_struct(struct_name: &Ident, attrs: &[Attribute]) -> TokenStream {
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::IntoApp for #struct_name {
Expand Down Expand Up @@ -109,7 +110,8 @@ pub fn gen_for_enum(enum_name: &Ident, attrs: &[Attribute]) -> TokenStream {
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::IntoApp for #enum_name {
Expand Down
6 changes: 4 additions & 2 deletions clap_derive/src/derives/subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ pub fn gen_for_enum(enum_name: &Ident, attrs: &[Attribute], e: &DataEnum) -> Tok
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::Subcommand for #enum_name {
Expand Down Expand Up @@ -102,7 +103,8 @@ fn gen_from_arg_matches_for_enum(name: &Ident, attrs: &[Attribute], e: &DataEnum
clippy::perf,
clippy::deprecated,
clippy::nursery,
clippy::cargo
clippy::cargo,
clippy::suspicious_else_formatting,
)]
#[deny(clippy::correctness)]
impl clap::FromArgMatches for #name {
Expand Down

0 comments on commit 4b70a6e

Please sign in to comment.