diff --git a/arrow/src/array/array_dictionary.rs b/arrow/src/array/array_dictionary.rs index a9feff903bc9..72df22e560cf 100644 --- a/arrow/src/array/array_dictionary.rs +++ b/arrow/src/array/array_dictionary.rs @@ -86,7 +86,7 @@ pub struct DictionaryArray { is_ordered: bool, } -impl<'a, K: ArrowPrimitiveType> DictionaryArray { +impl DictionaryArray { /// 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 diff --git a/arrow/src/array/array_primitive.rs b/arrow/src/array/array_primitive.rs index e4146e768ed7..2267afffc164 100644 --- a/arrow/src/array/array_primitive.rs +++ b/arrow/src/array/array_primitive.rs @@ -390,7 +390,7 @@ impl From<&Option<::Native>> } } -impl<'a, T: ArrowPrimitiveType, Ptr: Into>> FromIterator +impl>> FromIterator for PrimitiveArray { fn from_iter>(iter: I) -> Self { diff --git a/arrow/src/array/array_string.rs b/arrow/src/array/array_string.rs index ba3ee373c252..fc36a77b0019 100644 --- a/arrow/src/array/array_string.rs +++ b/arrow/src/array/array_string.rs @@ -216,7 +216,7 @@ where } } -impl<'a, Ptr, OffsetSize: StringOffsetSizeTrait> FromIterator> +impl FromIterator> for GenericStringArray where Ptr: AsRef, diff --git a/arrow/src/compute/kernels/arithmetic.rs b/arrow/src/compute/kernels/arithmetic.rs index 2d63924a12d3..35f55d6650dc 100644 --- a/arrow/src/compute/kernels/arithmetic.rs +++ b/arrow/src/compute/kernels/arithmetic.rs @@ -659,9 +659,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) diff --git a/arrow/src/util/display.rs b/arrow/src/util/display.rs index 743f7f483e27..44f38000fb17 100644 --- a/arrow/src/util/display.rs +++ b/arrow/src/util/display.rs @@ -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; @@ -207,7 +208,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 diff --git a/parquet/src/encodings/decoding.rs b/parquet/src/encodings/decoding.rs index 24e0c962e7f2..982d396f2197 100644 --- a/parquet/src/encodings/decoding.rs +++ b/parquet/src/encodings/decoding.rs @@ -433,7 +433,6 @@ pub struct DeltaBitPackDecoder { 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 @@ -444,7 +443,6 @@ pub struct DeltaBitPackDecoder { 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 @@ -839,7 +837,7 @@ impl DeltaByteArrayDecoder { } } -impl<'m, T: DataType> Decoder for DeltaByteArrayDecoder { +impl Decoder for DeltaByteArrayDecoder { fn set_data(&mut self, data: ByteBufferPtr, num_values: usize) -> Result<()> { match T::get_physical_type() { Type::BYTE_ARRAY | Type::FIXED_LEN_BYTE_ARRAY => {