From 62435f922a0b0b100f217f13047d4741c14ec1c5 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Mon, 26 May 2025 15:20:59 +0800 Subject: [PATCH] impl `Default` for `array::IntoIter` --- library/core/src/array/iter.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index 90f76d6d4c7be..a59b2f05305d2 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -224,6 +224,13 @@ impl IntoIter { } } +#[stable(feature = "array_value_iter_default", since = "CURRENT_RUSTC_VERSION")] +impl Default for IntoIter { + fn default() -> Self { + IntoIter::empty() + } +} + #[stable(feature = "array_value_iter_impls", since = "1.40.0")] impl Iterator for IntoIter { type Item = T;