From 322b8136bc2c0272f97b1dc3ae7776adb7a945e7 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Mon, 27 Feb 2023 19:31:05 +0200 Subject: [PATCH] lint: 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 b5d51bfca397..d019cd7a5783 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 8a44e0c42196..e5bf16dec9c7 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 {