From 3b1f5e34620d6bfa32a127258e2c2d9f2f4d693b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 8 Mar 2021 15:32:41 -0800 Subject: Use iter::zip in library/ --- library/core/src/array/iter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/core/src/array') diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs index f82454addd0..c36542f6314 100644 --- a/library/core/src/array/iter.rs +++ b/library/core/src/array/iter.rs @@ -2,7 +2,7 @@ use crate::{ fmt, - iter::{ExactSizeIterator, FusedIterator, TrustedLen, TrustedRandomAccess}, + iter::{self, ExactSizeIterator, FusedIterator, TrustedLen, TrustedRandomAccess}, mem::{self, MaybeUninit}, ops::Range, ptr, @@ -215,7 +215,7 @@ impl Clone for IntoIter { let mut new = Self { data: MaybeUninit::uninit_array(), alive: 0..0 }; // Clone all alive elements. - for (src, dst) in self.as_slice().iter().zip(&mut new.data) { + for (src, dst) in iter::zip(self.as_slice(), &mut new.data) { // Write a clone into the new array, then update its alive range. // If cloning panics, we'll correctly drop the previous items. dst.write(src.clone()); -- cgit 1.4.1-3-g733a5