Skip to content

Commit

Permalink
Resolve suppressed clippy warning in BitPacked::take (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 authored Oct 24, 2024
1 parent cdca5a1 commit 372f71c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions encodings/fastlanes/src/bitpacking/compute/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ impl TakeFn for BitPackedArray {
}
}

// array_chunks must use while-let so that we can get the remainder
#[allow(clippy::while_let_on_iterator)]
fn take_primitive<T: NativePType + BitPacking, I: NativePType>(
array: &BitPackedArray,
indices: &PrimitiveArray,
Expand Down Expand Up @@ -87,8 +85,7 @@ fn take_primitive<T: NativePType + BitPacking, I: NativePType>(
.array_chunks::<UNPACK_CHUNK_THRESHOLD>();

// this loop only runs if we have at least UNPACK_CHUNK_THRESHOLD offsets
// NB: must use while-let instead of for-in loop so that we can get the remainder
while let Some(offset_chunk) = offset_chunk_iter.next() {
for offset_chunk in &mut offset_chunk_iter {
if !have_unpacked {
unsafe {
BitPacking::unchecked_unpack(bit_width, packed_chunk, &mut unpacked);
Expand Down

0 comments on commit 372f71c

Please sign in to comment.