Skip to content

Commit

Permalink
optimize some more ignored_any
Browse files Browse the repository at this point in the history
  • Loading branch information
Ten0 committed Nov 13, 2024
1 parent c85582c commit 634ffbd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions serde_avro_fast/src/de/deserializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,20 @@ impl<'de, R: ReadSlice<'de>> Deserializer<'de> for DatumDeserializer<'_, '_, R>
elements_schema: elements_schema.as_ref(),
block_reader: BlockReader::new(self.state, true, self.allowed_depth.dec()?),
}),
SchemaNode::Int => {
// Skip zigzag decoding
let _: u32 = self.state.read_varint()?;
visitor.visit_unit()
}
SchemaNode::Long | SchemaNode::Enum(_) => {
// Skip zigzag decoding
let _: u64 = self.state.read_varint()?;
visitor.visit_unit()
}
SchemaNode::Duration => {
self.state.read_const_size_buf::<12>()?;
visitor.visit_unit()
}
_ => self.deserialize_any(visitor),
}
}
Expand Down

0 comments on commit 634ffbd

Please sign in to comment.