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 2021/11/09 12:25:52 UTC
[arrow-rs] branch active_release updated: fix some warning about
unused variables in panic tests (#894) (#933)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch active_release
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/active_release by this push:
new c3eae1e fix some warning about unused variables in panic tests (#894) (#933)
c3eae1e is described below
commit c3eae1ec56303b97c9e15263063a6a13122ef194
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Tue Nov 9 07:25:05 2021 -0500
fix some warning about unused variables in panic tests (#894) (#933)
Co-authored-by: Jiayu Liu <Ji...@users.noreply.github.com>
---
arrow/src/array/array_binary.rs | 4 ++--
arrow/src/array/array_boolean.rs | 2 +-
arrow/src/array/array_list.rs | 12 ++++++------
arrow/src/array/array_primitive.rs | 2 +-
arrow/src/array/array_string.rs | 2 +-
arrow/src/array/array_struct.rs | 8 ++++----
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arrow/src/array/array_binary.rs b/arrow/src/array/array_binary.rs
index 89a3efd..8808c40 100644
--- a/arrow/src/array/array_binary.rs
+++ b/arrow/src/array/array_binary.rs
@@ -1138,7 +1138,7 @@ mod tests {
.build()
.unwrap();
let list_array = ListArray::from(array_data);
- BinaryArray::from(list_array);
+ drop(BinaryArray::from(list_array));
}
#[test]
@@ -1217,7 +1217,7 @@ mod tests {
.build()
.unwrap();
let list_array = FixedSizeListArray::from(array_data);
- FixedSizeBinaryArray::from(list_array);
+ drop(FixedSizeBinaryArray::from(list_array));
}
#[test]
diff --git a/arrow/src/array/array_boolean.rs b/arrow/src/array/array_boolean.rs
index 07f3da6..d98ad5f 100644
--- a/arrow/src/array/array_boolean.rs
+++ b/arrow/src/array/array_boolean.rs
@@ -336,6 +336,6 @@ mod tests {
.len(5)
.build()
.unwrap();
- BooleanArray::from(data);
+ drop(BooleanArray::from(data));
}
}
diff --git a/arrow/src/array/array_list.rs b/arrow/src/array/array_list.rs
index fbba8fc..fb8d007 100644
--- a/arrow/src/array/array_list.rs
+++ b/arrow/src/array/array_list.rs
@@ -768,7 +768,7 @@ mod tests {
.add_child_data(value_data)
.build()
.unwrap();
- FixedSizeListArray::from(list_data);
+ drop(FixedSizeListArray::from(list_data));
}
#[test]
@@ -1050,7 +1050,7 @@ mod tests {
.add_child_data(value_data)
.build()
.unwrap();
- ListArray::from(list_data);
+ drop(ListArray::from(list_data));
}
#[test]
@@ -1066,7 +1066,7 @@ mod tests {
.add_buffer(value_offsets)
.build()
.unwrap();
- ListArray::from(list_data);
+ drop(ListArray::from(list_data));
}
#[test]
@@ -1088,7 +1088,7 @@ mod tests {
.add_child_data(value_data)
.build()
.unwrap();
- ListArray::from(list_data);
+ drop(ListArray::from(list_data));
}
#[test]
@@ -1101,7 +1101,7 @@ mod tests {
.add_buffer(buf2)
.build()
.unwrap();
- Int32Array::from(array_data);
+ drop(Int32Array::from(array_data));
}
#[test]
@@ -1124,7 +1124,7 @@ mod tests {
.add_child_data(value_data)
.build()
.unwrap();
- ListArray::from(list_data);
+ drop(ListArray::from(list_data));
}
#[test]
diff --git a/arrow/src/array/array_primitive.rs b/arrow/src/array/array_primitive.rs
index a93e703..0b88ce4 100644
--- a/arrow/src/array/array_primitive.rs
+++ b/arrow/src/array/array_primitive.rs
@@ -951,7 +951,7 @@ mod tests {
(values buffer)")]
fn test_primitive_array_invalid_buffer_len() {
let data = ArrayData::builder(DataType::Int32).len(5).build().unwrap();
- Int32Array::from(data);
+ drop(Int32Array::from(data));
}
#[test]
diff --git a/arrow/src/array/array_string.rs b/arrow/src/array/array_string.rs
index c07f34a..0d8dcf1 100644
--- a/arrow/src/array/array_string.rs
+++ b/arrow/src/array/array_string.rs
@@ -405,7 +405,7 @@ mod tests {
#[should_panic(expected = "[Large]StringArray expects Datatype::[Large]Utf8")]
fn test_string_array_from_int() {
let array = LargeStringArray::from(vec!["a", "b"]);
- StringArray::from(array.data().clone());
+ drop(StringArray::from(array.data().clone()));
}
#[test]
diff --git a/arrow/src/array/array_struct.rs b/arrow/src/array/array_struct.rs
index a1cab7f..33458c3 100644
--- a/arrow/src/array/array_struct.rs
+++ b/arrow/src/array/array_struct.rs
@@ -408,7 +408,7 @@ mod tests {
expected = "the field data types must match the array data in a StructArray"
)]
fn test_struct_array_from_mismatched_types() {
- StructArray::from(vec![
+ drop(StructArray::from(vec![
(
Field::new("b", DataType::Int16, false),
Arc::new(BooleanArray::from(vec![false, false, true, true]))
@@ -418,7 +418,7 @@ mod tests {
Field::new("c", DataType::Utf8, false),
Arc::new(Int32Array::from(vec![42, 28, 19, 31])),
),
- ]);
+ ]));
}
#[test]
@@ -515,7 +515,7 @@ mod tests {
expected = "all child arrays of a StructArray must have the same length"
)]
fn test_invalid_struct_child_array_lengths() {
- StructArray::from(vec![
+ drop(StructArray::from(vec![
(
Field::new("b", DataType::Float32, false),
Arc::new(Float32Array::from(vec![1.1])) as Arc<dyn Array>,
@@ -524,6 +524,6 @@ mod tests {
Field::new("c", DataType::Float64, false),
Arc::new(Float64Array::from(vec![2.2, 3.3])),
),
- ]);
+ ]));
}
}