From bdadabb44994f058787bcc9f32ad91d3e8ff20bd Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Sun, 1 Dec 2024 16:45:30 +0000 Subject: [PATCH] More clippy --- arrow-avro/src/reader/vlq.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arrow-avro/src/reader/vlq.rs b/arrow-avro/src/reader/vlq.rs index 26ab6dbcfbe..b198a0d66f2 100644 --- a/arrow-avro/src/reader/vlq.rs +++ b/arrow-avro/src/reader/vlq.rs @@ -67,9 +67,8 @@ pub(crate) fn read_varint(buf: &[u8]) -> Option<(u64, usize)> { #[inline] fn read_varint_array(buf: [u8; 10]) -> Option<(u64, usize)> { let mut in_progress = 0_u64; - for idx in 0..9 { - let b = buf[idx] as u64; - in_progress += b << (7 * idx); + for (idx, b) in buf.into_iter().take(9).enumerate() { + in_progress += (b as u64) << (7 * idx); if b < 0x80 { return Some((in_progress, idx + 1)); }