Replace IntoIter::new with IntoIterator::into_iter in std
This commit is contained in:
@@ -416,7 +416,7 @@ impl<T, const N: usize> [T; N] {
|
||||
{
|
||||
// SAFETY: we know for certain that this iterator will yield exactly `N`
|
||||
// items.
|
||||
unsafe { collect_into_array_unchecked(&mut IntoIter::new(self).map(f)) }
|
||||
unsafe { collect_into_array_unchecked(&mut IntoIterator::into_iter(self).map(f)) }
|
||||
}
|
||||
|
||||
/// 'Zips up' two arrays into a single array of pairs.
|
||||
@@ -437,7 +437,7 @@ impl<T, const N: usize> [T; N] {
|
||||
/// ```
|
||||
#[unstable(feature = "array_zip", issue = "80094")]
|
||||
pub fn zip<U>(self, rhs: [U; N]) -> [(T, U); N] {
|
||||
let mut iter = IntoIter::new(self).zip(IntoIter::new(rhs));
|
||||
let mut iter = IntoIterator::into_iter(self).zip(rhs);
|
||||
|
||||
// SAFETY: we know for certain that this iterator will yield exactly `N`
|
||||
// items.
|
||||
|
||||
Reference in New Issue
Block a user