@@ -737,20 +737,15 @@ pub trait IteratorExt: Iterator + Sized {
737
737
fn rev ( self ) -> Rev < Self > {
738
738
Rev { iter : self }
739
739
}
740
- }
741
-
742
- #[ unstable = "trait is unstable" ]
743
- impl < I > IteratorExt for I where I : Iterator { }
744
740
745
- /// Extention trait for iterators of pairs.
746
- #[ unstable = "newly added trait, likely to be merged with IteratorExt" ]
747
- pub trait IteratorPairExt < A , B > : Iterator < Item =( A , B ) > + Sized {
748
741
/// Converts an iterator of pairs into a pair of containers.
749
742
///
750
743
/// Loops through the entire iterator, collecting the first component of
751
744
/// each item into one new container, and the second component into another.
752
- fn unzip < FromA , FromB > ( mut self ) -> ( FromA , FromB ) where
753
- FromA : Default + Extend < A > , FromB : Default + Extend < B >
745
+ fn unzip < A , B , FromA , FromB > ( mut self ) -> ( FromA , FromB ) where
746
+ FromA : Default + Extend < A > ,
747
+ FromB : Default + Extend < B > ,
748
+ Self : Iterator < Item =( A , B ) > ,
754
749
{
755
750
struct SizeHint < A > ( uint , Option < uint > ) ;
756
751
impl < A > Iterator for SizeHint < A > {
@@ -778,7 +773,8 @@ pub trait IteratorPairExt<A, B>: Iterator<Item=(A, B)> + Sized {
778
773
}
779
774
}
780
775
781
- impl < A , B , I > IteratorPairExt < A , B > for I where I : Iterator < Item =( A , B ) > { }
776
+ #[ unstable = "trait is unstable" ]
777
+ impl < I > IteratorExt for I where I : Iterator { }
782
778
783
779
/// A range iterator able to yield elements from both ends
784
780
///
0 commit comments