Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: remove useless mut #4443

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arrow-buffer/src/util/bit_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ mod tests {
}

#[test]
#[cfg(all(any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
fn test_ceil() {
assert_eq!(ceil(0, 1), 0);
assert_eq!(ceil(1, 1), 1);
Expand Down
6 changes: 3 additions & 3 deletions arrow-select/src/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use arrow_buffer::{
use arrow_data::{ArrayData, ArrayDataBuilder};
use arrow_schema::{ArrowError, DataType, FieldRef};

use num::Zero;
use num::{One, Zero};

/// Take elements by index from [Array], creating a new [Array] from those indexes.
///
Expand Down Expand Up @@ -623,7 +623,7 @@ fn take_value_indices_from_list<IndexType, OffsetType>(
where
IndexType: ArrowPrimitiveType,
OffsetType: ArrowPrimitiveType,
OffsetType::Native: OffsetSizeTrait + std::ops::Add + num::Zero + num::One,
OffsetType::Native: OffsetSizeTrait + std::ops::Add + Zero + One,
PrimitiveArray<OffsetType>: From<Vec<OffsetType::Native>>,
{
// TODO: benchmark this function, there might be a faster unsafe alternative
Expand Down Expand Up @@ -656,7 +656,7 @@ where
// if start == end, this slot is empty
while curr < end {
values.push(curr);
curr += num::One::one();
curr += One::one();
}
if !list.is_valid(ix) {
bit_util::unset_bit(null_slice, i);
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/schema/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ mod tests {
let expected_schema = parse_message_type(message_type).unwrap();
let mut thrift_schema = to_thrift(&expected_schema).unwrap();
// Change all of None to Some(0)
for mut elem in &mut thrift_schema[..] {
for elem in &mut thrift_schema[..] {
if elem.num_children.is_none() {
elem.num_children = Some(0);
}
Expand Down