Repository: jorgecarleitao/arrow2
Pull request #1336 (2022-12-18 12:39:26)

Fixed clippy

codecov[bot]: # [Codecov](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao) Report
Base: **83.10**% // Head: **83.09**% // Decreases project coverage by **`-0.01%`** :warning:
> Coverage data is based on head [(`1d9ca40`)](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao) compared to base [(`1b190fc`)](https://codecov.io/gh/jorgecarleitao/arrow2/commit/1b190fc9883a618631f88a5fd939221d968ece65?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao).
> Patch coverage: 91.66% of modified lines in pull request are covered.

> :exclamation: Current head 1d9ca40 differs from pull request most recent head 525a3fc. Consider uploading reports for the commit 525a3fc to get more accurate results

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #1336      +/-   ##
==========================================
- Coverage   83.10%   83.09%   -0.02%     
==========================================
  Files         370      370              
  Lines       40170    40161       -9     
==========================================
- Hits        33385    33373      -12     
- Misses       6785     6788       +3     
```


| [Impacted Files](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao) | Coverage Δ | |
|---|---|---|
| [src/io/odbc/read/schema.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2lvL29kYmMvcmVhZC9zY2hlbWEucnM=) | `0.00% <0.00%> (ø)` | |
| [src/array/fixed\_size\_binary/mod.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2FycmF5L2ZpeGVkX3NpemVfYmluYXJ5L21vZC5ycw==) | `85.02% <50.00%> (ø)` | |
| [src/io/ipc/read/stream\_async.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2lvL2lwYy9yZWFkL3N0cmVhbV9hc3luYy5ycw==) | `76.71% <75.00%> (ø)` | |
| [src/io/parquet/read/statistics/mod.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2lvL3BhcnF1ZXQvcmVhZC9zdGF0aXN0aWNzL21vZC5ycw==) | `87.74% <80.00%> (ø)` | |
| [src/array/fixed\_size\_binary/ffi.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2FycmF5L2ZpeGVkX3NpemVfYmluYXJ5L2ZmaS5ycw==) | `97.22% <100.00%> (ø)` | |
| [src/array/fixed\_size\_binary/mutable.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2FycmF5L2ZpeGVkX3NpemVfYmluYXJ5L211dGFibGUucnM=) | `82.35% <100.00%> (ø)` | |
| [src/array/fixed\_size\_list/mod.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2FycmF5L2ZpeGVkX3NpemVfbGlzdC9tb2QucnM=) | `85.71% <100.00%> (-0.19%)` | :arrow_down: |
| [src/array/growable/fixed\_size\_list.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2FycmF5L2dyb3dhYmxlL2ZpeGVkX3NpemVfbGlzdC5ycw==) | `73.01% <100.00%> (ø)` | |
| [src/compute/cast/primitive\_to.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2NvbXB1dGUvY2FzdC9wcmltaXRpdmVfdG8ucnM=) | `93.11% <100.00%> (ø)` | |
| [src/compute/comparison/primitive.rs](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao#diff-c3JjL2NvbXB1dGUvY29tcGFyaXNvbi9wcmltaXRpdmUucnM=) | `95.01% <100.00%> (-0.04%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao) | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao)

</details>

[:umbrella: View full report at Codecov](https://codecov.io/gh/jorgecarleitao/arrow2/pull/1336?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jorge+Leitao).


Patch:
diff --git a/examples/ipc_file_write.rs b/examples/ipc_file_write.rs
index 51f570b228..0629faa80a 100644
--- a/examples/ipc_file_write.rs
+++ b/examples/ipc_file_write.rs
@@ -31,8 +31,8 @@ fn main() -> Result<()> {
         Field::new("b", DataType::Utf8, false),
     ]);
 
-    let a = Int32Array::from_slice(&[1, 2, 3, 4, 5]);
-    let b = Utf8Array::<i32>::from_slice(&["a", "b", "c", "d", "e"]);
+    let a = Int32Array::from_slice([1, 2, 3, 4, 5]);
+    let b = Utf8Array::<i32>::from_slice(["a", "b", "c", "d", "e"]);
 
     let chunk = Chunk::try_new(vec![a.boxed(), b.boxed()])?;
 
diff --git a/src/array/fixed_size_binary/ffi.rs b/src/array/fixed_size_binary/ffi.rs
index f1775e74d5..444f3c3996 100644
--- a/src/array/fixed_size_binary/ffi.rs
+++ b/src/array/fixed_size_binary/ffi.rs
@@ -16,7 +16,7 @@ unsafe impl ToFfi for FixedSizeBinaryArray {
     }
 
     fn offset(&self) -> Option<usize> {
-        let offset = self.values.offset() / self.size as usize;
+        let offset = self.values.offset() / self.size;
         if let Some(bitmap) = self.validity.as_ref() {
             if bitmap.offset() == offset {
                 Some(offset)
diff --git a/src/array/fixed_size_binary/mod.rs b/src/array/fixed_size_binary/mod.rs
index 8eea1c6c19..9806262db8 100644
--- a/src/array/fixed_size_binary/mod.rs
+++ b/src/array/fixed_size_binary/mod.rs
@@ -160,7 +160,7 @@ impl FixedSizeBinaryArray {
     /// Returns the length of this array
     #[inline]
     pub fn len(&self) -> usize {
-        self.values.len() / self.size as usize
+        self.values.len() / self.size
     }
 
     /// The optional validity.
@@ -329,6 +329,6 @@ impl FixedSizeBinaryValues for FixedSizeBinaryArray {
 
     #[inline]
     fn size(&self) -> usize {
-        self.size as usize
+        self.size
     }
 }
diff --git a/src/array/fixed_size_binary/mutable.rs b/src/array/fixed_size_binary/mutable.rs
index b6d60bade5..9009f2702d 100644
--- a/src/array/fixed_size_binary/mutable.rs
+++ b/src/array/fixed_size_binary/mutable.rs
@@ -146,7 +146,7 @@ impl MutableFixedSizeBinaryArray {
     /// Returns the length of this array
     #[inline]
     pub fn len(&self) -> usize {
-        self.values.len() / self.size as usize
+        self.values.len() / self.size
     }
 
     /// Pop the last entry from [`MutableFixedSizeBinaryArray`].
diff --git a/src/array/fixed_size_list/mod.rs b/src/array/fixed_size_list/mod.rs
index 298f11716d..5b8df559ee 100644
--- a/src/array/fixed_size_list/mod.rs
+++ b/src/array/fixed_size_list/mod.rs
@@ -140,7 +140,7 @@ impl FixedSizeListArray {
         let values = self
             .values
             .clone()
-            .slice_unchecked(offset * self.size as usize, length * self.size as usize);
+            .slice_unchecked(offset * self.size, length * self.size);
         Self {
             data_type: self.data_type.clone(),
             size: self.size,
@@ -174,7 +174,7 @@ impl FixedSizeListArray {
     /// Returns the length of this array
     #[inline]
     pub fn len(&self) -> usize {
-        self.values.len() / self.size as usize
+        self.values.len() / self.size
     }
 
     /// The optional validity.
@@ -193,8 +193,7 @@ impl FixedSizeListArray {
     /// panics iff `i >= self.len()`
     #[inline]
     pub fn value(&self, i: usize) -> Box<dyn Array> {
-        self.values
-            .slice(i * self.size as usize, self.size as usize)
+        self.values.slice(i * self.size, self.size)
     }
 
     /// Returns the `Vec<T>` at position `i`.
@@ -202,8 +201,7 @@ impl FixedSizeListArray {
     /// Caller must ensure that `i < self.len()`
     #[inline]
     pub unsafe fn value_unchecked(&self, i: usize) -> Box<dyn Array> {
-        self.values
-            .slice_unchecked(i * self.size as usize, self.size as usize)
+        self.values.slice_unchecked(i * self.size, self.size)
     }
 }
 
@@ -214,7 +212,7 @@ impl FixedSizeListArray {
                 if *size == 0 {
                     return Err(Error::oos("FixedSizeBinaryArray expects a positive size"));
                 }
-                Ok((child.as_ref(), *size as usize))
+                Ok((child.as_ref(), *size))
             }
             _ => Err(Error::oos(
                 "FixedSizeListArray expects DataType::FixedSizeList",
diff --git a/src/array/growable/fixed_size_list.rs b/src/array/growable/fixed_size_list.rs
index 26344f4c96..6fb88233a7 100644
--- a/src/array/growable/fixed_size_list.rs
+++ b/src/array/growable/fixed_size_list.rs
@@ -40,7 +40,7 @@ impl<'a> GrowableFixedSizeList<'a> {
 
         let size =
             if let DataType::FixedSizeList(_, size) = &arrays[0].data_type().to_logical_type() {
-                *size as usize
+                *size
             } else {
                 unreachable!("`GrowableFixedSizeList` expects `DataType::FixedSizeList`")
             };
diff --git a/src/compute/cast/primitive_to.rs b/src/compute/cast/primitive_to.rs
index 4feb5aaba6..585e826cdd 100644
--- a/src/compute/cast/primitive_to.rs
+++ b/src/compute/cast/primitive_to.rs
@@ -38,7 +38,7 @@ pub fn primitive_to_binary<T: NativeType + lexical_core::ToLexical, O: Offset>(
             let len = lexical_core::write_unchecked(*x, bytes).len();
 
             offset += len;
-            offsets.push(O::from_usize(offset as usize).unwrap());
+            offsets.push(O::from_usize(offset).unwrap());
         }
         values.set_len(offset);
         values.shrink_to_fit();
@@ -398,11 +398,7 @@ pub fn time64_to_time32(
     let from_size = time_unit_multiple(from_unit);
     let to_size = time_unit_multiple(to_unit);
     let divisor = from_size / to_size;
-    unary(
-        from,
-        |x| (x as i64 / divisor) as i32,
-        DataType::Time32(to_unit),
-    )
+    unary(from, |x| (x / divisor) as i32, DataType::Time32(to_unit))
 }
 
 /// Conversion of timestamp
diff --git a/src/compute/comparison/primitive.rs b/src/compute/comparison/primitive.rs
index 05e5254f44..e0df8b1218 100644
--- a/src/compute/comparison/primitive.rs
+++ b/src/compute/comparison/primitive.rs
@@ -335,10 +335,7 @@ mod tests {
         let b = Int64Array::from_slice([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
         let c = b.slice(5, 5);
         let d = eq(&c, &a);
-        assert_eq!(
-            d,
-            BooleanArray::from_slice(&vec![true, true, true, false, true])
-        );
+        assert_eq!(d, BooleanArray::from_slice([true, true, true, false, true]));
     }
 
     #[test]
@@ -584,11 +581,11 @@ mod tests {
     #[test]
     fn test_length_of_result_buffer() {
         // `item_count` is chosen to not be a multiple of 64.
-        let item_count = 130;
+        const ITEM_COUNT: usize = 130;
 
-        let array_a = Int8Array::from_slice(&vec![1; item_count]);
-        let array_b = Int8Array::from_slice(&vec![2; item_count]);
-        let expected = BooleanArray::from_slice(&vec![false; item_count]);
+        let array_a = Int8Array::from_slice([1; ITEM_COUNT]);
+        let array_b = Int8Array::from_slice([2; ITEM_COUNT]);
+        let expected = BooleanArray::from_slice([false; ITEM_COUNT]);
         let result = gt_eq(&array_a, &array_b);
 
         assert_eq!(result, expected)
diff --git a/src/compute/sort/binary.rs b/src/compute/sort/binary.rs
index cf0992b4b9..8110e8dae6 100644
--- a/src/compute/sort/binary.rs
+++ b/src/compute/sort/binary.rs
@@ -10,7 +10,7 @@ pub(super) fn indices_sorted_unstable_by<I: Index, O: Offset>(
     options: &SortOptions,
     limit: Option<usize>,
 ) -> PrimitiveArray<I> {
-    let get = |idx| unsafe { array.value_unchecked(idx as usize) };
+    let get = |idx| unsafe { array.value_unchecked(idx) };
     let cmp = |lhs: &&[u8], rhs: &&[u8]| lhs.cmp(rhs);
     common::indices_sorted_unstable_by(array.validity(), get, cmp, array.len(), options, limit)
 }
diff --git a/src/compute/sort/utf8.rs b/src/compute/sort/utf8.rs
index 0d7190eb23..adba92ea2d 100644
--- a/src/compute/sort/utf8.rs
+++ b/src/compute/sort/utf8.rs
@@ -10,7 +10,7 @@ pub(super) fn indices_sorted_unstable_by<I: Index, O: Offset>(
     options: &SortOptions,
     limit: Option<usize>,
 ) -> PrimitiveArray<I> {
-    let get = |idx| unsafe { array.value_unchecked(idx as usize) };
+    let get = |idx| unsafe { array.value_unchecked(idx) };
     let cmp = |lhs: &&str, rhs: &&str| lhs.cmp(rhs);
     common::indices_sorted_unstable_by(array.validity(), get, cmp, array.len(), options, limit)
 }
diff --git a/src/compute/substring.rs b/src/compute/substring.rs
index 95618c6a00..7a20114ed1 100644
--- a/src/compute/substring.rs
+++ b/src/compute/substring.rs
@@ -90,7 +90,7 @@ fn binary_substring<O: Offset>(
             } else {
                 length_i + start
             };
-        let start = start.max(windows[0]).min(windows[1]);
+        let start = start.clamp(windows[0], windows[1]);
 
         let length: O = length
             .unwrap_or(length_i)
diff --git a/src/compute/window.rs b/src/compute/window.rs
index 7752759f37..fb999318e6 100644
--- a/src/compute/window.rs
+++ b/src/compute/window.rs
@@ -52,7 +52,7 @@ pub fn shift(array: &dyn Array, offset: i64) -> Result<Box<dyn Array>> {
     let slice = array.slice(slice_offset, length);
 
     // Generate array with remaining `null` items
-    let nulls = abs(offset as i64) as usize;
+    let nulls = abs(offset) as usize;
 
     let null_array = new_null_array(array.data_type().clone(), nulls);
 
diff --git a/src/io/avro/read/deserialize.rs b/src/io/avro/read/deserialize.rs
index 54b7950a77..6d95fe1914 100644
--- a/src/io/avro/read/deserialize.rs
+++ b/src/io/avro/read/deserialize.rs
@@ -51,10 +51,10 @@ fn make_mutable(
                     capacity,
                 )) as Box<dyn MutableArray>
             }
-            DataType::FixedSizeBinary(size) => Box::new(MutableFixedSizeBinaryArray::with_capacity(
-                *size as usize,
-                capacity,
-            )) as Box<dyn MutableArray>,
+            DataType::FixedSizeBinary(size) => {
+                Box::new(MutableFixedSizeBinaryArray::with_capacity(*size, capacity))
+                    as Box<dyn MutableArray>
+            }
             DataType::Struct(fields) => {
                 let values = fields
                     .iter()
@@ -195,7 +195,7 @@ fn deserialize_value<'a>(
                     array.push(Some(value))
                 }
                 PrimitiveType::Int64 => {
-                    let value = util::zigzag_i64(&mut block)? as i64;
+                    let value = util::zigzag_i64(&mut block)?;
                     let array = array
                         .as_mut_any()
                         .downcast_mut::<MutablePrimitiveArray<i64>>()
@@ -274,7 +274,7 @@ fn deserialize_value<'a>(
                         .as_mut_any()
                         .downcast_mut::<MutablePrimitiveArray<i128>>()
                         .unwrap();
-                    array.push(Some(data as i128))
+                    array.push(Some(data))
                 }
                 _ => unreachable!(),
             },
diff --git a/src/io/ipc/read/stream.rs b/src/io/ipc/read/stream.rs
index cea6e08825..6cf0e2904b 100644
--- a/src/io/ipc/read/stream.rs
+++ b/src/io/ipc/read/stream.rs
@@ -48,7 +48,7 @@ pub fn read_stream_metadata<R: Read>(reader: &mut R) -> Result<StreamMetadata> {
         .map_err(|_| Error::from(OutOfSpecKind::NegativeFooterLength))?;
 
     let mut buffer = vec![];
-    buffer.try_reserve(length as usize)?;
+    buffer.try_reserve(length)?;
     reader
         .by_ref()
         .take(length as u64)
@@ -135,7 +135,7 @@ fn read_next<R: Read>(
     }
 
     message_buffer.clear();
-    message_buffer.try_reserve(meta_length as usize)?;
+    message_buffer.try_reserve(meta_length)?;
     reader
         .by_ref()
         .take(meta_length as u64)
@@ -158,7 +158,7 @@ fn read_next<R: Read>(
     match header {
         arrow_format::ipc::MessageHeaderRef::RecordBatch(batch) => {
             data_buffer.clear();
-            data_buffer.try_reserve(block_length as usize)?;
+            data_buffer.try_reserve(block_length)?;
             reader
                 .by_ref()
                 .take(block_length as u64)
@@ -193,7 +193,7 @@ fn read_next<R: Read>(
         }
         arrow_format::ipc::MessageHeaderRef::DictionaryBatch(batch) => {
             data_buffer.clear();
-            data_buffer.try_reserve(block_length as usize)?;
+            data_buffer.try_reserve(block_length)?;
             reader
                 .by_ref()
                 .take(block_length as u64)
diff --git a/src/io/ipc/read/stream_async.rs b/src/io/ipc/read/stream_async.rs
index 4c8556f0ea..a1ba5f530d 100644
--- a/src/io/ipc/read/stream_async.rs
+++ b/src/io/ipc/read/stream_async.rs
@@ -58,7 +58,7 @@ pub async fn read_stream_metadata_async<R: AsyncRead + Unpin + Send>(
         .map_err(|_| Error::from(OutOfSpecKind::NegativeFooterLength))?;
 
     let mut meta_buffer = vec![];
-    meta_buffer.try_reserve(meta_len as usize)?;
+    meta_buffer.try_reserve(meta_len)?;
     reader
         .take(meta_len as u64)
         .read_to_end(&mut meta_buffer)
@@ -109,7 +109,7 @@ async fn maybe_next<R: AsyncRead + Unpin + Send>(
     }
 
     state.message_buffer.clear();
-    state.message_buffer.try_reserve(meta_length as usize)?;
+    state.message_buffer.try_reserve(meta_length)?;
     (&mut state.reader)
         .take(meta_length as u64)
         .read_to_end(&mut state.message_buffer)
@@ -132,7 +132,7 @@ async fn maybe_next<R: AsyncRead + Unpin + Send>(
     match header {
         arrow_format::ipc::MessageHeaderRef::RecordBatch(batch) => {
             state.data_buffer.clear();
-            state.data_buffer.try_reserve(block_length as usize)?;
+            state.data_buffer.try_reserve(block_length)?;
             (&mut state.reader)
                 .take(block_length as u64)
                 .read_to_end(&mut state.data_buffer)
@@ -155,7 +155,7 @@ async fn maybe_next<R: AsyncRead + Unpin + Send>(
         }
         arrow_format::ipc::MessageHeaderRef::DictionaryBatch(batch) => {
             state.data_buffer.clear();
-            state.data_buffer.try_reserve(block_length as usize)?;
+            state.data_buffer.try_reserve(block_length)?;
             (&mut state.reader)
                 .take(block_length as u64)
                 .read_to_end(&mut state.data_buffer)
diff --git a/src/io/ipc/write/common.rs b/src/io/ipc/write/common.rs
index 1672d69bc0..e2bff77a7d 100644
--- a/src/io/ipc/write/common.rs
+++ b/src/io/ipc/write/common.rs
@@ -371,7 +371,7 @@ pub struct EncodedData {
 /// Calculate an 8-byte boundary and return the number of bytes needed to pad to 8 bytes
 #[inline]
 pub(crate) fn pad_to_64(len: usize) -> usize {
-    (((len + 63) & !63) - len) as usize
+    ((len + 63) & !63) - len
 }
 
 /// An array [`Chunk`] with optional accompanying IPC fields.
diff --git a/src/io/odbc/read/schema.rs b/src/io/odbc/read/schema.rs
index dba4c23373..c679500b7a 100644
--- a/src/io/odbc/read/schema.rs
+++ b/src/io/odbc/read/schema.rs
@@ -23,7 +23,7 @@ pub fn infer_schema(resut_set_metadata: &impl ResultSetMetadata) -> Result<Vec<F
 
 fn column_to_field(column_description: &api::ColumnDescription) -> Field {
     Field::new(
-        &column_description
+        column_description
             .name_to_string()
             .expect("Column name must be representable in utf8"),
         column_to_data_type(&column_description.data_type),
diff --git a/src/io/parquet/read/deserialize/simple.rs b/src/io/parquet/read/deserialize/simple.rs
index 28dfaa4812..8b8ad6db45 100644
--- a/src/io/parquet/read/deserialize/simple.rs
+++ b/src/io/parquet/read/deserialize/simple.rs
@@ -127,7 +127,7 @@ pub fn page_iter_to_arrays<'a, I: Pages + 'a>(
             data_type,
             num_rows,
             chunk_size,
-            |x: i32| x as i32,
+            |x: i32| x,
         ))),
 
         Timestamp(time_unit, _) => {
@@ -255,7 +255,7 @@ pub fn page_iter_to_arrays<'a, I: Pages + 'a>(
             data_type,
             num_rows,
             chunk_size,
-            |x: i64| x as i64,
+            |x: i64| x,
         ))),
         UInt64 => dyn_iter(iden(primitive::IntegerIter::new(
             pages,
@@ -493,7 +493,7 @@ fn dict_read<'a, K: DictionaryKey, I: Pages + 'a>(
                 data_type,
                 num_rows,
                 chunk_size,
-                |x: i32| x as i32,
+                |x: i32| x,
             ))
         }
 
diff --git a/src/io/parquet/read/row_group.rs b/src/io/parquet/read/row_group.rs
index ed4d724b63..e17dba30fe 100644
--- a/src/io/parquet/read/row_group.rs
+++ b/src/io/parquet/read/row_group.rs
@@ -134,10 +134,7 @@ where
 
     let mut chunk = vec![];
     chunk.try_reserve(length as usize)?;
-    reader
-        .by_ref()
-        .take(length as u64)
-        .read_to_end(&mut chunk)?;
+    reader.by_ref().take(length).read_to_end(&mut chunk)?;
     Ok((meta, chunk))
 }
 
@@ -155,7 +152,7 @@ where
 
     let mut chunk = vec![];
     chunk.try_reserve(length as usize)?;
-    reader.take(length as u64).read_to_end(&mut chunk).await?;
+    reader.take(length).read_to_end(&mut chunk).await?;
     Result::Ok((meta, chunk))
 }
 
diff --git a/src/io/parquet/read/statistics/mod.rs b/src/io/parquet/read/statistics/mod.rs
index ad30859cfa..599fa0102f 100644
--- a/src/io/parquet/read/statistics/mod.rs
+++ b/src/io/parquet/read/statistics/mod.rs
@@ -441,7 +441,7 @@ fn push(
         Boolean => boolean::push(from, min, max),
         Int8 => primitive::push(from, min, max, |x: i32| Ok(x as i8)),
         Int16 => primitive::push(from, min, max, |x: i32| Ok(x as i16)),
-        Date32 | Time32(_) => primitive::push(from, min, max, |x: i32| Ok(x as i32)),
+        Date32 | Time32(_) => primitive::push::<i32, i32, _>(from, min, max, Ok),
         Interval(IntervalUnit::YearMonth) => fixlen::push_year_month(from, min, max),
         Interval(IntervalUnit::DayTime) => fixlen::push_days_ms(from, min, max),
         UInt8 => primitive::push(from, min, max, |x: i32| Ok(x as u8)),
@@ -455,9 +455,9 @@ fn push(
                 other
             ))),
         },
-        Int32 => primitive::push(from, min, max, |x: i32| Ok(x as i32)),
+        Int32 => primitive::push::<i32, i32, _>(from, min, max, Ok),
         Int64 | Date64 | Time64(_) | Duration(_) => {
-            primitive::push(from, min, max, |x: i64| Ok(x as i64))
+            primitive::push::<i64, i64, _>(from, min, max, Ok)
         }
         UInt64 => primitive::push(from, min, max, |x: i64| Ok(x as u64)),
         Timestamp(time_unit, _) => {
@@ -498,8 +498,8 @@ fn push(
                 })
             }
         }
-        Float32 => primitive::push(from, min, max, |x: f32| Ok(x as f32)),
-        Float64 => primitive::push(from, min, max, |x: f64| Ok(x as f64)),
+        Float32 => primitive::push::<f32, f32, _>(from, min, max, Ok),
+        Float64 => primitive::push::<f64, f64, _>(from, min, max, Ok),
         Decimal(_, _) => match physical_type {
             ParquetPhysicalType::Int32 => primitive::push(from, min, max, |x: i32| Ok(x as i128)),
             ParquetPhysicalType::Int64 => primitive::push(from, min, max, |x: i64| Ok(x as i128)),
diff --git a/src/io/parquet/write/nested/def.rs b/src/io/parquet/write/nested/def.rs
index 4e82ad88af..395f73b913 100644
--- a/src/io/parquet/write/nested/def.rs
+++ b/src/io/parquet/write/nested/def.rs
@@ -117,7 +117,7 @@ impl<'a> Iterator for DefLevelsIter<'a> {
         if *self.remaining.last().unwrap() > 0 {
             *self.remaining.last_mut().unwrap() -= 1;
 
-            let primitive = self.primitive_validity.next()?.0 as u32;
+            let primitive = self.primitive_validity.next()?.0;
             let r = Some(self.total + primitive);
 
             for level in 0..self.current_level - 1 {
@@ -130,7 +130,7 @@ impl<'a> Iterator for DefLevelsIter<'a> {
             }
             if self.remaining[0] == 0 {
                 self.current_level -= 1;
-                self.total -= self.validity[0] as u32;
+                self.total -= self.validity[0];
             }
             self.remaining_values -= 1;
             return r;


Test patch:
diff --git a/tests/it/array/equal/utf8.rs b/tests/it/array/equal/utf8.rs
index 28e13d4a2e..7d4e725c0b 100644
--- a/tests/it/array/equal/utf8.rs
+++ b/tests/it/array/equal/utf8.rs
@@ -7,10 +7,10 @@ fn test_generic_string_equal<O: Offset>() {
     let cases = binary_cases();
 
     for (lhs, rhs, expected) in cases {
-        let lhs = lhs.iter().map(|x| x.as_deref()).collect::<Vec<_>>();
-        let rhs = rhs.iter().map(|x| x.as_deref()).collect::<Vec<_>>();
-        let lhs = Utf8Array::<O>::from(&lhs);
-        let rhs = Utf8Array::<O>::from(&rhs);
+        let lhs = lhs.iter().map(|x| x.as_deref());
+        let rhs = rhs.iter().map(|x| x.as_deref());
+        let lhs = Utf8Array::<O>::from_trusted_len_iter(lhs);
+        let rhs = Utf8Array::<O>::from_trusted_len_iter(rhs);
         test_equal(&lhs, &rhs, expected);
     }
 }
diff --git a/tests/it/compute/concatenate.rs b/tests/it/compute/concatenate.rs
index 7e4ea3d432..fe1d715d03 100644
--- a/tests/it/compute/concatenate.rs
+++ b/tests/it/compute/concatenate.rs
@@ -11,8 +11,8 @@ fn empty_vec() {
 #[test]
 fn incompatible_datatypes() {
     let re = concatenate(&[
-        &Int64Array::from(vec![Some(-1), Some(2), None]),
-        &Utf8Array::<i32>::from(&vec![Some("hello"), Some("bar"), Some("world")]),
+        &Int64Array::from([Some(-1), Some(2), None]),
+        &Utf8Array::<i32>::from([Some("hello"), Some("bar"), Some("world")]),
     ]);
     assert!(re.is_err());
 }
@@ -20,12 +20,12 @@ fn incompatible_datatypes() {
 #[test]
 fn string_arrays() -> Result<()> {
     let arr = concatenate(&[
-        &Utf8Array::<i32>::from_slice(&vec!["hello", "world"]),
-        &Utf8Array::<i32>::from_slice(&vec!["2", "3", "4"]),
-        &Utf8Array::<i32>::from(&vec![Some("foo"), Some("bar"), None, Some("baz")]),
+        &Utf8Array::<i32>::from_slice(["hello", "world"]),
+        &Utf8Array::<i32>::from_slice(["2", "3", "4"]),
+        &Utf8Array::<i32>::from([Some("foo"), Some("bar"), None, Some("baz")]),
     ])?;
 
-    let expected_output = Utf8Array::<i32>::from(&vec![
+    let expected_output = Utf8Array::<i32>::from([
         Some("hello"),
         Some("world"),
         Some("2"),
diff --git a/tests/it/compute/filter.rs b/tests/it/compute/filter.rs
index 4ad80c49ae..cdec0b8297 100644
--- a/tests/it/compute/filter.rs
+++ b/tests/it/compute/filter.rs
@@ -82,8 +82,8 @@ fn primative_array_with_null() {
 
 #[test]
 fn string_array_with_null() {
-    let a = Utf8Array::<i32>::from(&vec![Some("hello"), None, Some("world"), None]);
-    let b = BooleanArray::from_slice(vec![true, false, false, true]);
+    let a = Utf8Array::<i32>::from([Some("hello"), None, Some("world"), None]);
+    let b = BooleanArray::from_slice([true, false, false, true]);
     let c = filter(&a, &b).unwrap();
     let d = c
         .as_ref()
@@ -99,7 +99,7 @@ fn string_array_with_null() {
 #[test]
 fn binary_array_with_null() {
     let data: Vec<Option<&[u8]>> = vec![Some(b"hello"), None, Some(b"world"), None];
-    let a = BinaryArray::<i32>::from(&data);
+    let a = BinaryArray::<i32>::from(data);
     let b = BooleanArray::from_slice(vec![true, false, false, true]);
     let c = filter(&a, &b).unwrap();
     let d = c
diff --git a/tests/it/compute/length.rs b/tests/it/compute/length.rs
index 0a6b5e51e8..ed4ab83c9f 100644
--- a/tests/it/compute/length.rs
+++ b/tests/it/compute/length.rs
@@ -13,7 +13,7 @@ fn length_test_string<O: Offset>() {
     ]
     .into_iter()
     .for_each(|(input, expected)| {
-        let array = Utf8Array::<O>::from(&input);
+        let array = Utf8Array::<O>::from(input);
         let result = length(&array).unwrap();
 
         let data_type = if O::IS_LARGE {
diff --git a/tests/it/compute/sort/lex_sort.rs b/tests/it/compute/sort/lex_sort.rs
index a24f116dc8..fb04589f31 100644
--- a/tests/it/compute/sort/lex_sort.rs
+++ b/tests/it/compute/sort/lex_sort.rs
@@ -40,18 +40,18 @@ fn test_lex_sort_mixed_types() {
             options: None,
         },
     ];
-    let c1 = Int64Array::from(&[Some(-1), Some(0), Some(0), Some(2)]);
-    let c2 = UInt32Array::from(&[Some(7), Some(101), Some(102), Some(8)]);
-    let c3 = Int64Array::from(&[Some(-3), Some(-1), Some(-4), Some(-2)]);
-    let expected = vec![Box::new(c1) as Box<dyn Array>, Box::new(c2), Box::new(c3)];
+    let c1 = Int64Array::from([Some(-1), Some(0), Some(0), Some(2)]);
+    let c2 = UInt32Array::from([Some(7), Some(101), Some(102), Some(8)]);
+    let c3 = Int64Array::from([Some(-3), Some(-1), Some(-4), Some(-2)]);
+    let expected = vec![c1.boxed(), c2.boxed(), c3.boxed()];
     test_lex_sort_arrays(input, expected);
 }
 
 #[test]
 fn test_lex_sort_mixed_types2() {
     // test mix of string and in64 with option
-    let c1 = Int64Array::from(&[Some(0), Some(2), Some(-1), Some(0)]);
-    let c2 = Utf8Array::<i32>::from(&vec![Some("foo"), Some("9"), Some("7"), Some("bar")]);
+    let c1 = Int64Array::from([Some(0), Some(2), Some(-1), Some(0)]);
+    let c2 = Utf8Array::<i32>::from([Some("foo"), Some("9"), Some("7"), Some("bar")]);
     let input = vec![
         SortColumn {
             values: &c1,
@@ -69,13 +69,8 @@ fn test_lex_sort_mixed_types2() {
         },
     ];
     let expected = vec![
-        Box::new(Int64Array::from(&[Some(2), Some(0), Some(0), Some(-1)])) as Box<dyn Array>,
-        Box::new(Utf8Array::<i32>::from(&vec![
-            Some("9"),
-            Some("foo"),
-            Some("bar"),
-            Some("7"),
-        ])) as Box<dyn Array>,
+        Int64Array::from([Some(2), Some(0), Some(0), Some(-1)]).boxed(),
+        Utf8Array::<i32>::from([Some("9"), Some("foo"), Some("bar"), Some("7")]).boxed(),
     ];
     test_lex_sort_arrays(input, expected);
 }
diff --git a/tests/it/compute/substring.rs b/tests/it/compute/substring.rs
index 5b76a0ac34..13ae035d23 100644
--- a/tests/it/compute/substring.rs
+++ b/tests/it/compute/substring.rs
@@ -42,12 +42,12 @@ fn with_nulls_utf8<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, start, length, expected)| {
-            let array = Utf8Array::<O>::from(&array);
+            let array = Utf8Array::<O>::from(array);
             let result = substring(&array, start, &length)?;
             assert_eq!(array.len(), result.len());
 
             let result = result.as_any().downcast_ref::<Utf8Array<O>>().unwrap();
-            let expected = Utf8Array::<O>::from(&expected);
+            let expected = Utf8Array::<O>::from(expected);
 
             assert_eq!(&expected, result);
             Ok(())
@@ -130,11 +130,11 @@ fn without_nulls_utf8<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, start, length, expected)| {
-            let array = Utf8Array::<O>::from_slice(&array);
+            let array = Utf8Array::<O>::from_slice(array);
             let result = substring(&array, start, &length)?;
             assert_eq!(array.len(), result.len());
             let result = result.as_any().downcast_ref::<Utf8Array<O>>().unwrap();
-            let expected = Utf8Array::<O>::from_slice(&expected);
+            let expected = Utf8Array::<O>::from_slice(expected);
             assert_eq!(&expected, result);
             Ok(())
         })?;
@@ -194,12 +194,12 @@ fn with_null_binarys<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, start, length, expected)| {
-            let array = BinaryArray::<O>::from(&array);
+            let array = BinaryArray::<O>::from(array);
             let result = substring(&array, start, &length)?;
             assert_eq!(array.len(), result.len());
 
             let result = result.as_any().downcast_ref::<BinaryArray<O>>().unwrap();
-            let expected = BinaryArray::<O>::from(&expected);
+            let expected = BinaryArray::<O>::from(expected);
             assert_eq!(&expected, result);
             Ok(())
         })?;
@@ -274,11 +274,11 @@ fn without_null_binarys<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, start, length, expected)| {
-            let array = BinaryArray::<O>::from_slice(&array);
+            let array = BinaryArray::<O>::from_slice(array);
             let result = substring(&array, start, &length)?;
             assert_eq!(array.len(), result.len());
             let result = result.as_any().downcast_ref::<BinaryArray<O>>().unwrap();
-            let expected = BinaryArray::<O>::from_slice(&expected);
+            let expected = BinaryArray::<O>::from_slice(expected);
             assert_eq!(&expected, result);
             Ok(())
         })?;
diff --git a/tests/it/compute/utf8.rs b/tests/it/compute/utf8.rs
index e9d8613dde..21b89aac3b 100644
--- a/tests/it/compute/utf8.rs
+++ b/tests/it/compute/utf8.rs
@@ -51,12 +51,12 @@ fn with_nulls_utf8_lower<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, expected)| {
-            let array = Utf8Array::<O>::from(&array);
+            let array = Utf8Array::<O>::from(array);
             let result = lower(&array)?;
             assert_eq!(array.len(), result.len());
 
             let result = result.as_any().downcast_ref::<Utf8Array<O>>().unwrap();
-            let expected = Utf8Array::<O>::from(&expected);
+            let expected = Utf8Array::<O>::from(expected);
 
             assert_eq!(&expected, result);
             Ok(())
@@ -115,12 +115,12 @@ fn without_nulls_utf8_lower<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, expected)| {
-            let array = Utf8Array::<O>::from_slice(&array);
+            let array = Utf8Array::<O>::from_slice(array);
             let result = lower(&array)?;
             assert_eq!(array.len(), result.len());
 
             let result = result.as_any().downcast_ref::<Utf8Array<O>>().unwrap();
-            let expected = Utf8Array::<O>::from_slice(&expected);
+            let expected = Utf8Array::<O>::from_slice(expected);
             assert_eq!(&expected, result);
             Ok(())
         })?;
@@ -236,12 +236,12 @@ fn with_nulls_utf8<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, expected)| {
-            let array = Utf8Array::<O>::from(&array);
+            let array = Utf8Array::<O>::from(array);
             let result = upper(&array)?;
             assert_eq!(array.len(), result.len());
 
             let result = result.as_any().downcast_ref::<Utf8Array<O>>().unwrap();
-            let expected = Utf8Array::<O>::from(&expected);
+            let expected = Utf8Array::<O>::from(expected);
 
             assert_eq!(&expected, result);
             Ok(())
@@ -300,12 +300,12 @@ fn without_nulls_utf8<O: Offset>() -> Result<()> {
     cases
         .into_iter()
         .try_for_each::<_, Result<()>>(|(array, expected)| {
-            let array = Utf8Array::<O>::from_slice(&array);
+            let array = Utf8Array::<O>::from_slice(array);
             let result = upper(&array)?;
             assert_eq!(array.len(), result.len());
 
             let result = result.as_any().downcast_ref::<Utf8Array<O>>().unwrap();
-            let expected = Utf8Array::<O>::from_slice(&expected);
+            let expected = Utf8Array::<O>::from_slice(expected);
             assert_eq!(&expected, result);
             Ok(())
         })?;
diff --git a/tests/it/ffi/data.rs b/tests/it/ffi/data.rs
index bed327e834..4ac2066408 100644
--- a/tests/it/ffi/data.rs
+++ b/tests/it/ffi/data.rs
@@ -100,7 +100,7 @@ fn timestamp_tz() -> Result<()> {
 
 #[test]
 fn utf8_nullable() -> Result<()> {
-    let data = Utf8Array::<i32>::from(&vec![Some("a"), None, Some("bb"), None]);
+    let data = Utf8Array::<i32>::from([Some("a"), None, Some("bb"), None]);
     test_round_trip(data)
 }
 
@@ -124,14 +124,13 @@ fn utf8_sliced() -> Result<()> {
 
 #[test]
 fn large_utf8() -> Result<()> {
-    let data = Utf8Array::<i64>::from(&vec![Some("a"), None, Some("bb"), None]);
+    let data = Utf8Array::<i64>::from([Some("a"), None, Some("bb"), None]);
     test_round_trip(data)
 }
 
 #[test]
 fn binary_nullable() -> Result<()> {
-    let data =
-        BinaryArray::<i32>::from(&vec![Some(b"a".as_ref()), None, Some(b"bb".as_ref()), None]);
+    let data = BinaryArray::<i32>::from([Some(b"a".as_ref()), None, Some(b"bb".as_ref()), None]);
     test_round_trip(data)
 }
 
@@ -155,8 +154,7 @@ fn binary_sliced() -> Result<()> {
 
 #[test]
 fn large_binary() -> Result<()> {
-    let data =
-        BinaryArray::<i64>::from(&vec![Some(b"a".as_ref()), None, Some(b"bb".as_ref()), None]);
+    let data = BinaryArray::<i64>::from([Some(b"a".as_ref()), None, Some(b"bb".as_ref()), None]);
     test_round_trip(data)
 }
 
@@ -214,7 +212,7 @@ fn list_sliced() -> Result<()> {
     let array = ListArray::<i32>::try_new(
         DataType::List(Box::new(Field::new("a", DataType::Int32, true))),
         vec![0, 1, 1, 2].try_into().unwrap(),
-        Box::new(PrimitiveArray::<i32>::from_vec(vec![1, 2])),
+        Box::new(PrimitiveArray::<i32>::from_slice([1, 2])),
         Some(bitmap),
     )?;
 
diff --git a/tests/it/io/json/write.rs b/tests/it/io/json/write.rs
index ae7daf9bf9..cf09178ca8 100644
--- a/tests/it/io/json/write.rs
+++ b/tests/it/io/json/write.rs
@@ -45,7 +45,7 @@ fn f64() -> Result<()> {
 
 #[test]
 fn utf8() -> Result<()> {
-    let array = Utf8Array::<i32>::from(&vec![Some("a"), Some("b"), Some("c"), Some("d"), None]);
+    let array = Utf8Array::<i32>::from([Some("a"), Some("b"), Some("c"), Some("d"), None]);
 
     let expected = r#"["a","b","c","d",null]"#;
 
@@ -55,7 +55,7 @@ fn utf8() -> Result<()> {
 #[test]
 fn struct_() -> Result<()> {
     let c1 = Int32Array::from([Some(1), Some(2), Some(3), None, Some(5)]);
-    let c2 = Utf8Array::<i32>::from(&vec![Some("a"), Some("b"), Some("c"), Some("d"), None]);
+    let c2 = Utf8Array::<i32>::from([Some("a"), Some("b"), Some("c"), Some("d"), None]);
 
     let data_type = DataType::Struct(vec![
         Field::new("c1", c1.data_type().clone(), true),
@@ -86,7 +86,7 @@ fn nested_struct_with_validity() -> Result<()> {
             StructArray::new(
                 DataType::Struct(inner),
                 vec![
-                    Utf8Array::<i32>::from(&vec![None, Some("f"), Some("g")]).boxed(),
+                    Utf8Array::<i32>::from([None, Some("f"), Some("g")]).boxed(),
                     Int32Array::from(&[Some(20), None, Some(43)]).boxed(),
                 ],
                 Some(Bitmap::from([false, true, true])),
@@ -95,7 +95,7 @@ fn nested_struct_with_validity() -> Result<()> {
         ],
         Some(Bitmap::from([true, true, false])),
     );
-    let c2 = Utf8Array::<i32>::from(&vec![Some("a"), Some("b"), Some("c")]);
+    let c2 = Utf8Array::<i32>::from([Some("a"), Some("b"), Some("c")]);
 
     let data_type = DataType::Struct(vec![
         Field::new("c1", c1.data_type().clone(), true),
@@ -122,7 +122,7 @@ fn nested_struct() -> Result<()> {
             Int32Array::from(&[Some(1), None, Some(5)]).boxed(),
             StructArray::new(
                 DataType::Struct(vec![c121]),
-                vec![Box::new(Utf8Array::<i32>::from(&vec![
+                vec![Box::new(Utf8Array::<i32>::from([
                     Some("e"),
                     Some("f"),
                     Some("g"),
@@ -134,7 +134,7 @@ fn nested_struct() -> Result<()> {
         None,
     );
 
-    let c2 = Utf8Array::<i32>::from(&vec![Some("a"), Some("b"), Some("c")]);
+    let c2 = Utf8Array::<i32>::from([Some("a"), Some("b"), Some("c")]);
 
     let data_type = DataType::Struct(vec![
         Field::new("c1", c1.data_type().clone(), true),
@@ -198,7 +198,7 @@ fn nested_list() -> Result<()> {
     c1.try_extend(iter).unwrap();
     let c1: ListArray<i32> = c1.into();
 
-    let c2 = Utf8Array::<i32>::from(&vec![Some("foo"), Some("bar"), None]);
+    let c2 = Utf8Array::<i32>::from([Some("foo"), Some("bar"), None]);
 
     let data_type = DataType::Struct(vec![
         Field::new("c1", c1.data_type().clone(), true),
@@ -234,7 +234,7 @@ fn nested_list_records() -> Result<()> {
     c1.try_extend(iter).unwrap();
     let c1: ListArray<i32> = c1.into();
 
-    let c2 = Utf8Array::<i32>::from(&vec![Some("foo"), Some("bar"), None]);
+    let c2 = Utf8Array::<i32>::from([Some("foo"), Some("bar"), None]);
 
     let schema: Schema = vec![
         Field::new("c1", c1.data_type().clone(), true),
@@ -305,7 +305,7 @@ fn list_of_struct() -> Result<()> {
             Int32Array::from(&[Some(1), None, Some(5)]).boxed(),
             StructArray::new(
                 DataType::Struct(inner),
-                vec![Box::new(Utf8Array::<i32>::from(&vec![
+                vec![Box::new(Utf8Array::<i32>::from([
                     Some("e"),
                     Some("f"),
                     Some("g"),
@@ -343,7 +343,7 @@ fn list_of_struct() -> Result<()> {
 
 #[test]
 fn escaped_end_of_line_in_utf8() -> Result<()> {
-    let array = Utf8Array::<i32>::from(&vec![Some("a\na"), None]);
+    let array = Utf8Array::<i32>::from([Some("a\na"), None]);
 
     let expected = r#"["a\na",null]"#;
 
@@ -352,7 +352,7 @@ fn escaped_end_of_line_in_utf8() -> Result<()> {
 
 #[test]
 fn escaped_quotation_marks_in_utf8() -> Result<()> {
-    let array = Utf8Array::<i32>::from(&vec![Some("a\"a"), None]);
+    let array = Utf8Array::<i32>::from([Some("a\"a"), None]);
 
     let expected = r#"["a\"a",null]"#;
 
diff --git a/tests/it/io/ndjson/mod.rs b/tests/it/io/ndjson/mod.rs
index ecdaefc2e2..bd5626b1cb 100644
--- a/tests/it/io/ndjson/mod.rs
+++ b/tests/it/io/ndjson/mod.rs
@@ -203,7 +203,7 @@ fn case_struct() -> (String, Box<dyn Array>) {
     let fields = vec![a_field];
 
     // build expected output
-    let d = Utf8Array::<i32>::from(&vec![Some("text"), None, Some("text"), None]);
+    let d = Utf8Array::<i32>::from([Some("text"), None, Some("text"), None]);
     let c = StructArray::new(
         DataType::Struct(vec![d_field]),
         vec![d.boxed()],
@@ -247,7 +247,7 @@ fn case_nested_list() -> (String, Box<dyn Array>) {
     "#.to_string();
 
     // build expected output
-    let d = Utf8Array::<i32>::from(&vec![
+    let d = Utf8Array::<i32>::from([
         Some("a_text"),
         Some("b_text"),
         None,
diff --git a/tests/it/io/parquet/mod.rs b/tests/it/io/parquet/mod.rs
index f373a590b0..7017310176 100644
--- a/tests/it/io/parquet/mod.rs
+++ b/tests/it/io/parquet/mod.rs
@@ -171,7 +171,7 @@ pub fn pyarrow_nested_nullable(column: &str) -> Box<dyn Array> {
                 [""],
             ]
         */
-        "list_utf8" => Box::new(Utf8Array::<i32>::from(&[
+        "list_utf8" => Box::new(Utf8Array::<i32>::from([
             Some("Hello".to_string()),
             Some("bbb".to_string()),
             Some("aa".to_string()),
@@ -185,7 +185,7 @@ pub fn pyarrow_nested_nullable(column: &str) -> Box<dyn Array> {
             Some("bbb".to_string()),
             Some("".to_string()),
         ])),
-        "list_large_binary" => Box::new(BinaryArray::<i64>::from(&[
+        "list_large_binary" => Box::new(BinaryArray::<i64>::from([
             Some(b"Hello".to_vec()),
             Some(b"bbb".to_vec()),
             Some(b"aa".to_vec()),
@@ -334,7 +334,7 @@ pub fn pyarrow_nullable(column: &str) -> Box<dyn Array> {
             None,
             Some(9.0),
         ])),
-        "string" => Box::new(Utf8Array::<i32>::from(&[
+        "string" => Box::new(Utf8Array::<i32>::from([
             Some("Hello".to_string()),
             None,
             Some("aa".to_string()),
@@ -346,7 +346,7 @@ pub fn pyarrow_nullable(column: &str) -> Box<dyn Array> {
             Some("def".to_string()),
             Some("aaa".to_string()),
         ])),
-        "bool" => Box::new(BooleanArray::from(&[
+        "bool" => Box::new(BooleanArray::from([
             Some(true),
             None,
             Some(false),