Skip to content

Commit

Permalink
minor: remove useless mut (#4443)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener authored Jun 22, 2023
1 parent 0bcf200 commit 4b6c4d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 4b6c4d2

Please sign in to comment.