Skip to content

Commit bff4de9

Browse files
authored
Follow-up on #663 (#693)
1 parent ef8afe3 commit bff4de9

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

derive/src/max_encoded_len.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use crate::{
1919
trait_bounds,
20-
utils::{self, codec_crate_path, custom_mel_trait_bound, has_dumb_trait_bound, should_skip},
20+
utils::{codec_crate_path, custom_mel_trait_bound, has_dumb_trait_bound, should_skip},
2121
};
2222
use quote::{quote, quote_spanned};
2323
use syn::{parse_quote, spanned::Spanned, Data, DeriveInput, Field, Fields};
@@ -85,14 +85,8 @@ fn fields_length_expr(fields: &Fields, crate_path: &syn::Path) -> proc_macro2::T
8585
// caused the issue.
8686
let expansion = fields_iter.map(|field| {
8787
let ty = &field.ty;
88-
if utils::is_compact(field) {
89-
quote_spanned! {
90-
ty.span() => .saturating_add(<#crate_path::Compact::<#ty> as #crate_path::MaxEncodedLen>::max_encoded_len())
91-
}
92-
} else {
93-
quote_spanned! {
94-
ty.span() => .saturating_add(<#ty as #crate_path::MaxEncodedLen>::max_encoded_len())
95-
}
88+
quote_spanned! {
89+
ty.span() => .saturating_add(<#ty as #crate_path::MaxEncodedLen>::max_encoded_len())
9690
}
9791
});
9892
quote! {

0 commit comments

Comments
 (0)