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: Fix clippy error after updating rust toolchain #1984

Merged
merged 1 commit into from
Jul 1, 2022
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/src/array/array_dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub struct DictionaryArray<K: ArrowPrimitiveType> {
is_ordered: bool,
}

impl<'a, K: ArrowPrimitiveType> DictionaryArray<K> {
impl<K: ArrowPrimitiveType> DictionaryArray<K> {
/// Attempt to create a new DictionaryArray with a specified keys
/// (indexes into the dictionary) and values (dictionary)
/// array. Returns an error if there are any keys that are outside
Expand Down
2 changes: 1 addition & 1 deletion arrow/src/array/array_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl<T: ArrowPrimitiveType> From<&Option<<T as ArrowPrimitiveType>::Native>>
}
}

impl<'a, T: ArrowPrimitiveType, Ptr: Into<NativeAdapter<T>>> FromIterator<Ptr>
impl<T: ArrowPrimitiveType, Ptr: Into<NativeAdapter<T>>> FromIterator<Ptr>
for PrimitiveArray<T>
{
fn from_iter<I: IntoIterator<Item = Ptr>>(iter: I) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion arrow/src/array/array_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ where
}
}

impl<'a, Ptr, OffsetSize: OffsetSizeTrait> FromIterator<Option<Ptr>>
impl<Ptr, OffsetSize: OffsetSizeTrait> FromIterator<Option<Ptr>>
for GenericStringArray<OffsetSize>
where
Ptr: AsRef<str>,
Expand Down
4 changes: 1 addition & 3 deletions arrow/src/compute/kernels/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,9 +1071,7 @@ mod tests {
fn test_primitive_array_add_mismatched_length() {
let a = Int32Array::from(vec![5, 6, 7, 8, 9]);
let b = Int32Array::from(vec![6, 7, 8]);
let e = add(&a, &b)
.err()
.expect("should have failed due to different lengths");
let e = add(&a, &b).expect_err("should have failed due to different lengths");
assert_eq!(
"ComputeError(\"Cannot perform math operation on arrays of different length\")",
format!("{:?}", e)
Expand Down
3 changes: 2 additions & 1 deletion arrow/src/util/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
//! purposes. See the `pretty` crate for additional functions for
//! record batch pretty printing.

use std::fmt::Write;
use std::sync::Arc;

use crate::array::Array;
Expand Down Expand Up @@ -208,7 +209,7 @@ macro_rules! make_string_hex {
let mut tmp = "".to_string();

for character in array.value($row) {
tmp += &format!("{:02x}", character);
let _ = write!(tmp, "{:02x}", character);
}

tmp
Expand Down
4 changes: 1 addition & 3 deletions parquet/src/encodings/decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ pub struct DeltaBitPackDecoder<T: DataType> {
initialized: bool,

// Header info

/// The number of values in each block
block_size: usize,
/// The number of values that remain to be read in the current page
Expand All @@ -444,7 +443,6 @@ pub struct DeltaBitPackDecoder<T: DataType> {
values_per_mini_block: usize,

// Per block info

/// The minimum delta in the block
min_delta: T::T,
/// The byte offset of the end of the current block
Expand Down Expand Up @@ -839,7 +837,7 @@ impl<T: DataType> DeltaByteArrayDecoder<T> {
}
}

impl<'m, T: DataType> Decoder<T> for DeltaByteArrayDecoder<T> {
impl<T: DataType> Decoder<T> for DeltaByteArrayDecoder<T> {
fn set_data(&mut self, data: ByteBufferPtr, num_values: usize) -> Result<()> {
match T::get_physical_type() {
Type::BYTE_ARRAY | Type::FIXED_LEN_BYTE_ARRAY => {
Expand Down