diff options
| author | Muhammad Mominul Huque <mominul2082@gmail.com> | 2021-05-30 23:16:45 +0600 |
|---|---|---|
| committer | Muhammad Mominul Huque <mominul2082@gmail.com> | 2021-06-02 16:09:04 +0600 |
| commit | 01d4d46f66929122cc890279cde4765df7a0a90f (patch) | |
| tree | f03fb1793be56f1aa7e5a062cf93715a8ad436bf /library/core/src/array | |
| parent | d20b9add05d32761abad651f568f1b1831cb8cf6 (diff) | |
| download | rust-01d4d46f66929122cc890279cde4765df7a0a90f.tar.gz rust-01d4d46f66929122cc890279cde4765df7a0a90f.zip | |
Replace IntoIter::new with IntoIterator::into_iter in std
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index e25d006d213..37af3557fdd 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -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. |
