mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
fix: Remove strict linting from generated code
fix https://github.com/clap-rs/clap/issues/4733
This commit is contained in:
parent
5f247f5181
commit
fa76f6f78d
4 changed files with 0 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue