chore: address Rust 1.83.0 clippy lints and enable more clippy lints (#6705)

This commit is contained in:
Sanchith Hegde
2024-12-02 20:00:44 +05:30
committed by GitHub
parent 797a0db773
commit 9a59d0a5ff
139 changed files with 147 additions and 417 deletions

View File

@ -166,7 +166,6 @@ pub fn diesel_enum(
/// }
/// ```
///
/// # Panics
///
/// Panics if a struct without named fields is provided as input to the macro
@ -505,7 +504,6 @@ pub fn operation_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStre
/// payment_method: String,
/// }
/// ```
#[proc_macro_derive(
PolymorphicSchema,
attributes(mandatory_in, generate_schemas, remove_in)
@ -620,6 +618,7 @@ pub fn try_get_enum_variant(input: proc_macro::TokenStream) -> proc_macro::Token
///
/// Example
///
/// ```
/// #[derive(Default, Serialize, FlatStruct)]
/// pub struct User {
/// name: String,
@ -644,7 +643,7 @@ pub fn try_get_enum_variant(input: proc_macro::TokenStream) -> proc_macro::Token
/// ("address.zip", "941222"),
/// ("email", "test@example.com"),
/// ]
///
/// ```
#[proc_macro_derive(FlatStruct)]
pub fn flat_struct_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input = parse_macro_input!(input as syn::DeriveInput);

View File

@ -5,7 +5,7 @@ use quote::{quote, ToTokens};
use strum::IntoEnumIterator;
use syn::{self, parse::Parse, DeriveInput};
use crate::macros::helpers::{self};
use crate::macros::helpers;
#[derive(Debug, Clone, Copy, strum::EnumString, strum::EnumIter, strum::Display)]
#[strum(serialize_all = "snake_case")]