diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-06 14:47:09 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-09 15:58:13 -0800 |
| commit | 64a4decec779ee0a30585a12352d20a54b722506 (patch) | |
| tree | d0a6449d4e942fff9ad8ed602991f7d425db08eb | |
| parent | 134e00be7751a9fdc820981962e4fd7ea97bfff6 (diff) | |
| download | rust-64a4decec779ee0a30585a12352d20a54b722506.tar.gz rust-64a4decec779ee0a30585a12352d20a54b722506.zip | |
std: Remove typarms from IteratorExt::cloned
With associated types an where clauses none of the type parameters are necessary. [breaking-change]
| -rw-r--r-- | src/libcore/iter.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 5df64cfaada..fcf46b81a57 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -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 } } |
