mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-27 16:18:08 -05:00
chore(codecs-derive): update should_use_alt_impl (#11148)
This commit is contained in:
@@ -141,7 +141,7 @@ fn load_field_from_segments(
|
||||
}
|
||||
|
||||
if is_enum {
|
||||
fields.push(FieldTypes::EnumUnnamedField((ftype.to_string(), use_alt_impl)));
|
||||
fields.push(FieldTypes::EnumUnnamedField((ftype, use_alt_impl)));
|
||||
} else {
|
||||
let should_compact = is_flag_type(&ftype) ||
|
||||
field.attrs.iter().any(|attr| {
|
||||
@@ -162,8 +162,8 @@ fn load_field_from_segments(
|
||||
/// Vec/Option we try to find out if it's a Vec/Option of a fixed size data type, e.g. `Vec<B256>`.
|
||||
///
|
||||
/// If so, we use another impl to code/decode its data.
|
||||
fn should_use_alt_impl(ftype: &String, segment: &syn::PathSegment) -> bool {
|
||||
if *ftype == "Vec" || *ftype == "Option" {
|
||||
fn should_use_alt_impl(ftype: &str, segment: &syn::PathSegment) -> bool {
|
||||
if ftype == "Vec" || ftype == "Option" {
|
||||
if let syn::PathArguments::AngleBracketed(ref args) = segment.arguments {
|
||||
if let Some(syn::GenericArgument::Type(syn::Type::Path(arg_path))) = args.args.last() {
|
||||
if let (Some(path), 1) =
|
||||
|
||||
Reference in New Issue
Block a user