From 9691328a5ae31ea88a54b7eb668959eb986d8d8e Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Mon, 12 Oct 2020 13:37:44 -0700 Subject: [PATCH] Use Iterator::copied --- src/iter/copied.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/iter/copied.rs b/src/iter/copied.rs index 7bc737f42..12c9c5b5b 100644 --- a/src/iter/copied.rs +++ b/src/iter/copied.rs @@ -102,11 +102,10 @@ where T: 'a + Copy, { type Item = T; - type IntoIter = iter::Cloned; + type IntoIter = iter::Copied; fn into_iter(self) -> Self::IntoIter { - // FIXME: use `Iterator::copied()` when Rust 1.36 is our minimum. - self.base.into_iter().cloned() + self.base.into_iter().copied() } fn min_len(&self) -> usize { @@ -210,8 +209,7 @@ where where I: IntoIterator, { - // FIXME: use `Iterator::copied()` when Rust 1.36 is our minimum. - self.base = self.base.consume_iter(iter.into_iter().cloned()); + self.base = self.base.consume_iter(iter.into_iter().copied()); self }