Skip to content

Commit

Permalink
iter mut
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Sep 15, 2024
1 parent ffaf0c7 commit ac438f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 2 additions & 3 deletions vortex-array/src/array/chunked/compute/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ fn filter_slices<'a>(
ChunkFilter::Slices(slices) => slices.push(end_slice),
}

#[allow(clippy::needless_range_loop)]
for chunk in (start_chunk + 1)..end_chunk {
chunk_filters[chunk] = ChunkFilter::All;
for chunk in &mut chunk_filters[start_chunk + 1..end_chunk] {

This comment has been minimized.

Copy link
@robert3005

robert3005 Sep 15, 2024

Member

I think this is the right way to do it

*chunk = ChunkFilter::All;
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions vortex-array/src/array/chunked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ impl ChunkedArray {
/// A tuple (chunk_id, chunk_offset) that encodes the chunk and the offset within chunk
/// where the global index is found, if present.
pub fn find_chunk_idx(chunk_ends: &Array, index: usize) -> (usize, usize) {
assert!(
index <= chunk_ends.len(),
"Index out of bounds of the array"
);

// Since there might be duplicate values in offsets because of empty chunks we want to search from right
// and take the last chunk (we subtract 1 since there's a leading 0)
let index_chunk = search_sorted(chunk_ends, index, SearchSortedSide::Right)
Expand Down

0 comments on commit ac438f8

Please sign in to comment.