Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp committed Dec 24, 2024
1 parent 53548e0 commit 4ad1e56
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/polars-ops/src/chunked_array/gather/chunked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,10 @@ where
{
let mut views = Vec::with_capacity(by.len());
let mut validity = BitmapBuilder::with_capacity(by.len());
let arc_data_buffers;

// If we can cheaply clone the list of buffers from the ChunkedArray we will,
// otherwise we will only clone those buffers we need.
if ca.n_chunks() == 1 {
let arc_data_buffers = if ca.n_chunks() == 1 {
let arr = ca.downcast_iter().next().unwrap();
let arr_views = arr.views();

Expand Down Expand Up @@ -533,7 +532,7 @@ where
}
}

arc_data_buffers = arr.data_buffers().clone();
arr.data_buffers().clone()
} else {
let mut buffer_idxs = PlHashMap::with_capacity(8);
let mut buffers = Vec::with_capacity(8);
Expand Down Expand Up @@ -579,7 +578,7 @@ where
}
};

arc_data_buffers = buffers.into();
buffers.into()
};

let arr = BinaryViewArrayGeneric::<V>::new_unchecked_unknown_md(
Expand Down

0 comments on commit 4ad1e56

Please sign in to comment.