Skip to content

Commit

Permalink
* Minor Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Connor Sanders <[email protected]>
  • Loading branch information
jecsand838 committed Dec 31, 2024
1 parent 9cfda09 commit 84ffb62
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arrow-avro/src/reader/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,13 @@ impl<'a> AvroCursor<'a> {
let val: u32 = varint
.try_into()
.map_err(|_| ArrowError::ParseError("varint overflow".to_string()))?;
// Zig-zag decode
Ok((val >> 1) as i32 ^ -((val & 1) as i32))
}

/// Decode a zig-zag encoded Avro long (64-bit).
#[inline]
pub(crate) fn get_long(&mut self) -> Result<i64, ArrowError> {
let val = self.read_vlq()?;
// Zig-zag decode
Ok((val >> 1) as i64 ^ -((val & 1) as i64))
}

Expand Down

0 comments on commit 84ffb62

Please sign in to comment.