fix: Remove strict linting from generated code

fix https://github.com/clap-rs/clap/issues/4733
This commit is contained in:
Mingwei Samuel 2023-02-27 21:24:37 -08:00
parent 5f247f5181
commit fa76f6f78d
4 changed files with 0 additions and 7 deletions

View file

@ -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())
@ -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

View file

@ -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);
@ -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)

View file

@ -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())
@ -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

View file

@ -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