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:
parent
134e00be77
commit
64a4decec7
1 changed files with 3 additions and 4 deletions
|
|
@ -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 }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue