about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2025-05-26 15:20:59 +0800
committerDeadbeef <ent3rm4n@gmail.com>2025-05-26 15:21:03 +0800
commit62435f922a0b0b100f217f13047d4741c14ec1c5 (patch)
tree56089ce43f2c35ce39166051400b6fa32fe61c0a
parent46264e6dfd8f0bacae05c520b4617e054d6ef990 (diff)
downloadrust-62435f922a0b0b100f217f13047d4741c14ec1c5.tar.gz
rust-62435f922a0b0b100f217f13047d4741c14ec1c5.zip
impl `Default` for `array::IntoIter`
-rw-r--r--library/core/src/array/iter.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs
index 90f76d6d4c7..a59b2f05305 100644
--- a/library/core/src/array/iter.rs
+++ b/library/core/src/array/iter.rs
@@ -224,6 +224,13 @@ impl<T, const N: usize> IntoIter<T, N> {
     }
 }
 
+#[stable(feature = "array_value_iter_default", since = "CURRENT_RUSTC_VERSION")]
+impl<T, const N: usize> Default for IntoIter<T, N> {
+    fn default() -> Self {
+        IntoIter::empty()
+    }
+}
+
 #[stable(feature = "array_value_iter_impls", since = "1.40.0")]
 impl<T, const N: usize> Iterator for IntoIter<T, N> {
     type Item = T;