You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/06/22 14:47:09 UTC
[arrow-rs] branch master updated: minor: remove useless mut (#4443)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 4b6c4d234 minor: remove useless mut (#4443)
4b6c4d234 is described below
commit 4b6c4d23478a1548e269f5eb9fbd53a9140e9261
Author: jakevin <ja...@gmail.com>
AuthorDate: Thu Jun 22 22:47:03 2023 +0800
minor: remove useless mut (#4443)
---
arrow-buffer/src/util/bit_util.rs | 2 +-
arrow-select/src/take.rs | 6 +++---
parquet/src/schema/types.rs | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arrow-buffer/src/util/bit_util.rs b/arrow-buffer/src/util/bit_util.rs
index de4bc96f9..b27931f4c 100644
--- a/arrow-buffer/src/util/bit_util.rs
+++ b/arrow-buffer/src/util/bit_util.rs
@@ -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);
diff --git a/arrow-select/src/take.rs b/arrow-select/src/take.rs
index 4d599369c..0f5689ff9 100644
--- a/arrow-select/src/take.rs
+++ b/arrow-select/src/take.rs
@@ -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.
///
@@ -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
@@ -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);
diff --git a/parquet/src/schema/types.rs b/parquet/src/schema/types.rs
index 151f2b69f..fd22cedea 100644
--- a/parquet/src/schema/types.rs
+++ b/parquet/src/schema/types.rs
@@ -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);
}