From b31227738fb6efaeb7d9bb75739ef1cfc87f7f7e Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Tue, 28 Feb 2023 08:25:35 +0200 Subject: [PATCH] fix: Clippy rules order --- clap_derive/src/derives/args.rs | 4 ++-- clap_derive/src/derives/into_app.rs | 4 ++-- clap_derive/src/derives/subcommand.rs | 4 ++-- clap_derive/src/derives/value_enum.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index d019cd7a578..3324b80c541 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -109,9 +109,9 @@ pub fn gen_for_struct( clippy::nursery, clippy::cargo, clippy::suspicious_else_formatting, - clippy::almost_swapped, )] #[deny(clippy::correctness)] + #[allow(clippy::almost_swapped)] impl #impl_generics clap::FromArgMatches for #item_name #ty_generics #where_clause { fn from_arg_matches(__clap_arg_matches: &clap::ArgMatches) -> ::std::result::Result { Self::from_arg_matches_mut(&mut __clap_arg_matches.clone()) @@ -145,9 +145,9 @@ pub fn gen_for_struct( clippy::nursery, clippy::cargo, clippy::suspicious_else_formatting, - clippy::almost_swapped, )] #[deny(clippy::correctness)] + #[allow(clippy::almost_swapped)] impl #impl_generics clap::Args for #item_name #ty_generics #where_clause { fn group_id() -> Option { #group_id diff --git a/clap_derive/src/derives/into_app.rs b/clap_derive/src/derives/into_app.rs index 4241ac0e7dd..603d2c2f06a 100644 --- a/clap_derive/src/derives/into_app.rs +++ b/clap_derive/src/derives/into_app.rs @@ -36,9 +36,9 @@ 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)] + #[allow(clippy::almost_swapped)] impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause { fn command<'b>() -> clap::Command { let #app_var = clap::Command::new(#name); @@ -73,9 +73,9 @@ 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)] + #[allow(clippy::almost_swapped)] impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause { fn command<'b>() -> clap::Command { let #app_var = clap::Command::new(#name) diff --git a/clap_derive/src/derives/subcommand.rs b/clap_derive/src/derives/subcommand.rs index e5bf16dec9c..c785140ec6b 100644 --- a/clap_derive/src/derives/subcommand.rs +++ b/clap_derive/src/derives/subcommand.rs @@ -80,9 +80,9 @@ pub fn gen_for_enum( clippy::nursery, clippy::cargo, clippy::suspicious_else_formatting, - clippy::almost_swapped, )] #[deny(clippy::correctness)] + #[allow(clippy::almost_swapped)] impl #impl_generics clap::FromArgMatches for #item_name #ty_generics #where_clause { fn from_arg_matches(__clap_arg_matches: &clap::ArgMatches) -> ::std::result::Result { Self::from_arg_matches_mut(&mut __clap_arg_matches.clone()) @@ -107,9 +107,9 @@ pub fn gen_for_enum( clippy::nursery, clippy::cargo, clippy::suspicious_else_formatting, - clippy::almost_swapped, )] #[deny(clippy::correctness)] + #[allow(clippy::almost_swapped)] impl #impl_generics clap::Subcommand for #item_name #ty_generics #where_clause { fn augment_subcommands <'b>(__clap_app: clap::Command) -> clap::Command { #augmentation diff --git a/clap_derive/src/derives/value_enum.rs b/clap_derive/src/derives/value_enum.rs index 1e2daf3965d..0661cddaec8 100644 --- a/clap_derive/src/derives/value_enum.rs +++ b/clap_derive/src/derives/value_enum.rs @@ -65,9 +65,9 @@ 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)] + #[allow(clippy::almost_swapped)] impl clap::ValueEnum for #item_name { #value_variants #to_possible_value