File tree 1 file changed +3
-3
lines changed
crates/storage/codecs/derive/src/compact 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ fn load_field_from_segments(
141
141
}
142
142
143
143
if is_enum {
144
- fields. push ( FieldTypes :: EnumUnnamedField ( ( ftype. to_string ( ) , use_alt_impl) ) ) ;
144
+ fields. push ( FieldTypes :: EnumUnnamedField ( ( ftype, use_alt_impl) ) ) ;
145
145
} else {
146
146
let should_compact = is_flag_type ( & ftype) ||
147
147
field. attrs . iter ( ) . any ( |attr| {
@@ -162,8 +162,8 @@ fn load_field_from_segments(
162
162
/// Vec/Option we try to find out if it's a Vec/Option of a fixed size data type, e.g. `Vec<B256>`.
163
163
///
164
164
/// If so, we use another impl to code/decode its data.
165
- fn should_use_alt_impl ( ftype : & String , segment : & syn:: PathSegment ) -> bool {
166
- if * ftype == "Vec" || * ftype == "Option" {
165
+ fn should_use_alt_impl ( ftype : & str , segment : & syn:: PathSegment ) -> bool {
166
+ if ftype == "Vec" || ftype == "Option" {
167
167
if let syn:: PathArguments :: AngleBracketed ( ref args) = segment. arguments {
168
168
if let Some ( syn:: GenericArgument :: Type ( syn:: Type :: Path ( arg_path) ) ) = args. args . last ( ) {
169
169
if let ( Some ( path) , 1 ) =
You can’t perform that action at this time.
0 commit comments