Skip to content

Commit

Permalink
fix: Remove strict linting from generated code
Browse files Browse the repository at this point in the history
fix #4733
  • Loading branch information
MingweiSamuel committed Feb 28, 2023
1 parent 5f247f5 commit fa76f6f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions clap_derive/src/derives/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ pub fn gen_for_struct(
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
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, clap::Error> {
Self::from_arg_matches_mut(&mut __clap_arg_matches.clone())
Expand Down Expand Up @@ -147,7 +146,6 @@ pub fn gen_for_struct(
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::Args for #item_name #ty_generics #where_clause {
fn group_id() -> Option<clap::Id> {
#group_id
Expand Down
2 changes: 0 additions & 2 deletions clap_derive/src/derives/into_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ pub fn gen_for_struct(item: &Item, item_name: &Ident, generics: &Generics) -> To
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause {
fn command<'b>() -> clap::Command {
let #app_var = clap::Command::new(#name);
Expand Down Expand Up @@ -75,7 +74,6 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, generics: &Generics) -> Toke
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::CommandFactory for #item_name #ty_generics #where_clause {
fn command<'b>() -> clap::Command {
let #app_var = clap::Command::new(#name)
Expand Down
2 changes: 0 additions & 2 deletions clap_derive/src/derives/subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ pub fn gen_for_enum(
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
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, clap::Error> {
Self::from_arg_matches_mut(&mut __clap_arg_matches.clone())
Expand All @@ -109,7 +108,6 @@ pub fn gen_for_enum(
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl #impl_generics clap::Subcommand for #item_name #ty_generics #where_clause {
fn augment_subcommands <'b>(__clap_app: clap::Command) -> clap::Command {
#augmentation
Expand Down
1 change: 0 additions & 1 deletion clap_derive/src/derives/value_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ pub fn gen_for_enum(item: &Item, item_name: &Ident, variants: &[(&Variant, Item)
clippy::suspicious_else_formatting,
clippy::almost_swapped,
)]
#[deny(clippy::correctness)]
impl clap::ValueEnum for #item_name {
#value_variants
#to_possible_value
Expand Down

0 comments on commit fa76f6f

Please sign in to comment.