From f54503c908413ef54ac9dc8ccf47915fa07a3286 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 15 Aug 2019 09:59:25 +0200 Subject: [PATCH] libcore: more cleanups using associated_type_bounds --- src/libcore/iter/adapters/flatten.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libcore/iter/adapters/flatten.rs b/src/libcore/iter/adapters/flatten.rs index d8d41a2a31ef6..d812da26580bc 100644 --- a/src/libcore/iter/adapters/flatten.rs +++ b/src/libcore/iter/adapters/flatten.rs @@ -72,8 +72,7 @@ impl Iterator for FlatMap impl DoubleEndedIterator for FlatMap where F: FnMut(I::Item) -> U, - U: IntoIterator, - U::IntoIter: DoubleEndedIterator, + U: IntoIterator, { #[inline] fn next_back(&mut self) -> Option { self.inner.next_back() } @@ -107,10 +106,7 @@ impl FusedIterator for FlatMap /// [`Iterator`]: trait.Iterator.html #[must_use = "iterators are lazy and do nothing unless consumed"] #[stable(feature = "iterator_flatten", since = "1.29.0")] -pub struct Flatten -where - I::Item: IntoIterator, -{ +pub struct Flatten> { inner: FlattenCompat::IntoIter>, }