diff --git a/crates/polars-arrow/src/compute/temporal.rs b/crates/polars-arrow/src/compute/temporal.rs index 62c4867f0299..b8300a7ed306 100644 --- a/crates/polars-arrow/src/compute/temporal.rs +++ b/crates/polars-arrow/src/compute/temporal.rs @@ -203,11 +203,8 @@ where TimeUnit::Microsecond => timestamp_us_to_datetime, TimeUnit::Nanosecond => timestamp_ns_to_datetime, }; - Ok(PrimitiveArray::::from( - array - .iter() - .map(|v| v.map(|x| op(func(*x)))) - .collect::>(), + Ok(PrimitiveArray::::from_iter( + array.iter().map(|v| v.map(|x| op(func(*x)))), )) }, _ => unreachable!(),