From 5bab68a16f38630db65275102c2f5c129ebd99c7 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Mon, 27 Feb 2023 19:42:44 +0200 Subject: [PATCH] fix: Allow `clippy::almost_swapped` --- clap_derive/src/derives/into_app.rs | 2 ++ clap_derive/src/derives/value_enum.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/clap_derive/src/derives/into_app.rs b/clap_derive/src/derives/into_app.rs index a45667ab296..4241ac0e7dd 100644 --- a/clap_derive/src/derives/into_app.rs +++ b/clap_derive/src/derives/into_app.rs @@ -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 { @@ -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 { diff --git a/clap_derive/src/derives/value_enum.rs b/clap_derive/src/derives/value_enum.rs index a1411d02ab0..1e2daf3965d 100644 --- a/clap_derive/src/derives/value_enum.rs +++ b/clap_derive/src/derives/value_enum.rs @@ -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 {