Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Feb 3, 2024
1 parent 1e71c5b commit 15dc9c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/candid/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
{
check_recursion! {
self.unroll_type()?;
self.dec_value_cost(2)?;
self.dec_value_cost(1)?;
match (self.expect_type.as_ref(), self.wire_type.as_ref()) {
(TypeInner::Vec(e), TypeInner::Vec(w)) => {
let e = self.table.trace_type(e)?;
Expand Down Expand Up @@ -1095,6 +1095,7 @@ impl<'de, 'a> de::MapAccess<'de> for Compound<'a, 'de> {
if *len == 0 {
return Ok(None);
}
self.de.dec_value_cost(1)?;
self.de.expect_type = expect.0.clone();
self.de.wire_type = wire.0.clone();
*len -= 1;
Expand Down

0 comments on commit 15dc9c0

Please sign in to comment.