Skip to content

Commit

Permalink
fix: calculate the default value len when use the default encode feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Ggiggle committed Oct 18, 2024
1 parent 71560a6 commit d5fcaec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pilota/src/prost/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1658,10 +1658,10 @@ macro_rules! map {
KL: Fn(u32, &K) -> usize,
VL: Fn(u32, &V) -> usize,
{
let mut skip_default_value = false;
let mut skip_default_value = true;
#[cfg(feature = "pb-encode-default-value")]
{
skip_default_value = true;
skip_default_value = false;
}

key_len(tag) * values.len()
Expand Down

0 comments on commit d5fcaec

Please sign in to comment.