From 872135b64ff9a4dd41b86594b116541ad80179a2 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Mon, 27 Feb 2023 19:35:01 +0200 Subject: [PATCH] fix: Allow `clippy::almost_swapped` --- clap_derive/src/derives/args.rs | 2 ++ clap_derive/src/derives/subcommand.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index b5d51bfca39..d019cd7a578 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -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 { @@ -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 { diff --git a/clap_derive/src/derives/subcommand.rs b/clap_derive/src/derives/subcommand.rs index 8a44e0c4219..e5bf16dec9c 100644 --- a/clap_derive/src/derives/subcommand.rs +++ b/clap_derive/src/derives/subcommand.rs @@ -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 { @@ -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 {