Skip to content

Commit

Permalink
Merge pull request #4735 from rkrasiuk/rkrasiuk/fix-almost-swapped-lint
Browse files Browse the repository at this point in the history
fix(derive): Allow `clippy::almost_swapped`
  • Loading branch information
epage committed Feb 27, 2023
2 parents 84a9b53 + 5bab68a commit c3a942e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clap_derive/src/derives/args.rs
Expand Up @@ -109,6 +109,7 @@ pub fn gen_for_struct(
clippy::nursery,
clippy::cargo,
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::FromArgMatches for #item_name #ty_generics #where_clause {
Expand Down Expand Up @@ -144,6 +145,7 @@ pub fn gen_for_struct(
clippy::nursery,
clippy::cargo,
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::Args for #item_name #ty_generics #where_clause {
Expand Down
2 changes: 2 additions & 0 deletions clap_derive/src/derives/into_app.rs
Expand Up @@ -36,6 +36,7 @@ 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 {
Expand Down Expand Up @@ -72,6 +73,7 @@ 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 {
Expand Down
2 changes: 2 additions & 0 deletions clap_derive/src/derives/subcommand.rs
Expand Up @@ -80,6 +80,7 @@ pub fn gen_for_enum(
clippy::nursery,
clippy::cargo,
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::FromArgMatches for #item_name #ty_generics #where_clause {
Expand All @@ -106,6 +107,7 @@ pub fn gen_for_enum(
clippy::nursery,
clippy::cargo,
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::Subcommand for #item_name #ty_generics #where_clause {
Expand Down
1 change: 1 addition & 0 deletions clap_derive/src/derives/value_enum.rs
Expand Up @@ -65,6 +65,7 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, variants: &[(&Variant, Item)
clippy::nursery,
clippy::cargo,
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl clap::ValueEnum for #item_name {
Expand Down

0 comments on commit c3a942e

Please sign in to comment.