Skip to content

Commit 62435f9

Browse files
committed
impl Default for array::IntoIter
1 parent 46264e6 commit 62435f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/core/src/array/iter.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ impl<T, const N: usize> IntoIter<T, N> {
224224
}
225225
}
226226

227+
#[stable(feature = "array_value_iter_default", since = "CURRENT_RUSTC_VERSION")]
228+
impl<T, const N: usize> Default for IntoIter<T, N> {
229+
fn default() -> Self {
230+
IntoIter::empty()
231+
}
232+
}
233+
227234
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
228235
impl<T, const N: usize> Iterator for IntoIter<T, N> {
229236
type Item = T;

0 commit comments

Comments
 (0)