Skip to content

Commit fa76f6f

Browse files
committed
fix: Remove strict linting from generated code
fix #4733
1 parent 5f247f5 commit fa76f6f

File tree

4 files changed

+0
-7
lines changed

4 files changed

+0
-7
lines changed

clap_derive/src/derives/args.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ pub fn gen_for_struct(
111111
clippy::suspicious_else_formatting,
112112
clippy::almost_swapped,
113113
)]
114-
#[deny(clippy::correctness)]
115114
impl #impl_generics clap::FromArgMatches for #item_name #ty_generics #where_clause {
116115
fn from_arg_matches(__clap_arg_matches: &clap::ArgMatches) -> ::std::result::Result<Self, clap::Error> {
117116
Self::from_arg_matches_mut(&mut __clap_arg_matches.clone())
@@ -147,7 +146,6 @@ pub fn gen_for_struct(
147146
clippy::suspicious_else_formatting,
148147
clippy::almost_swapped,
149148
)]
150-
#[deny(clippy::correctness)]
151149
impl #impl_generics clap::Args for #item_name #ty_generics #where_clause {
152150
fn group_id() -> Option<clap::Id> {
153151
#group_id

clap_derive/src/derives/into_app.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub fn gen_for_struct(item: &Item, item_name: &Ident, generics: &Generics) -> To
3838
clippy::suspicious_else_formatting,
3939
clippy::almost_swapped,
4040
)]
41-
#[deny(clippy::correctness)]
4241
impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause {
4342
fn command<'b>() -> clap::Command {
4443
let #app_var = clap::Command::new(#name);
@@ -75,7 +74,6 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, generics: &Generics) -> Toke
7574
clippy::suspicious_else_formatting,
7675
clippy::almost_swapped,
7776
)]
78-
#[deny(clippy::correctness)]
7977
impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause {
8078
fn command<'b>() -> clap::Command {
8179
let #app_var = clap::Command::new(#name)

clap_derive/src/derives/subcommand.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ pub fn gen_for_enum(
8282
clippy::suspicious_else_formatting,
8383
clippy::almost_swapped,
8484
)]
85-
#[deny(clippy::correctness)]
8685
impl #impl_generics clap::FromArgMatches for #item_name #ty_generics #where_clause {
8786
fn from_arg_matches(__clap_arg_matches: &clap::ArgMatches) -> ::std::result::Result<Self, clap::Error> {
8887
Self::from_arg_matches_mut(&mut __clap_arg_matches.clone())
@@ -109,7 +108,6 @@ pub fn gen_for_enum(
109108
clippy::suspicious_else_formatting,
110109
clippy::almost_swapped,
111110
)]
112-
#[deny(clippy::correctness)]
113111
impl #impl_generics clap::Subcommand for #item_name #ty_generics #where_clause {
114112
fn augment_subcommands <'b>(__clap_app: clap::Command) -> clap::Command {
115113
#augmentation

clap_derive/src/derives/value_enum.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, variants: &[(&Variant, Item)
6767
clippy::suspicious_else_formatting,
6868
clippy::almost_swapped,
6969
)]
70-
#[deny(clippy::correctness)]
7170
impl clap::ValueEnum for #item_name {
7271
#value_variants
7372
#to_possible_value

0 commit comments

Comments
 (0)