std: Remove typarms from IteratorExt::cloned

With associated types an where clauses none of the type parameters are
necessary.

[breaking-change]
This commit is contained in:
Alex Crichton 2015-02-06 14:47:09 -08:00
parent 134e00be77
commit 64a4decec7

View file

@ -967,10 +967,9 @@ pub trait IteratorExt: Iterator + Sized {
/// Creates an iterator that clones the elements it yields. Useful for converting an
/// Iterator<&T> to an Iterator<T>.
#[unstable(feature = "core", reason = "recent addition")]
fn cloned<T, D>(self) -> Cloned<Self> where
Self: Iterator<Item=D>,
D: Deref<Target=T>,
T: Clone,
fn cloned(self) -> Cloned<Self> where
Self::Item: Deref,
<Self::Item as Deref>::Output: Clone,
{
Cloned { it: self }
}