mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
chore: address Rust 1.78 clippy lints (#4545)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -260,9 +260,9 @@ pub(super) fn get_unused_fields(
|
||||
ignore: &std::collections::HashSet<String>,
|
||||
) -> Vec<Field> {
|
||||
let fields = match fields {
|
||||
syn::Fields::Unit => Vec::new(),
|
||||
syn::Fields::Unnamed(_) => Vec::new(),
|
||||
syn::Fields::Named(fields) => fields.named.iter().cloned().collect(),
|
||||
Fields::Unit => Vec::new(),
|
||||
Fields::Unnamed(_) => Vec::new(),
|
||||
Fields::Named(fields) => fields.named.iter().cloned().collect(),
|
||||
};
|
||||
fields
|
||||
.iter()
|
||||
|
||||
@ -58,7 +58,7 @@ pub(super) fn get_struct_fields(
|
||||
Ok(named.to_owned())
|
||||
} else {
|
||||
Err(syn::Error::new(
|
||||
proc_macro2::Span::call_site(),
|
||||
Span::call_site(),
|
||||
"This macro cannot be used on structs with no fields",
|
||||
))
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ pub fn try_get_enum_variant(
|
||||
|
||||
let try_into_fn = syn::Ident::new(
|
||||
&format!("try_into_{}", variant_name.to_string().to_lowercase()),
|
||||
proc_macro2::Span::call_site(),
|
||||
Span::call_site(),
|
||||
);
|
||||
|
||||
Ok(quote::quote! {
|
||||
|
||||
Reference in New Issue
Block a user