@@ -546,7 +546,9 @@ pub enum NamesIter<'a> {
546
546
NamesIterDynamic ( :: std:: slice:: Iter < ' a , Option < String > > )
547
547
}
548
548
549
- impl < ' a > Iterator < Option < String > > for NamesIter < ' a > {
549
+ impl < ' a > Iterator for NamesIter < ' a > {
550
+ type Item = Option < String > ;
551
+
550
552
fn next ( & mut self ) -> Option < Option < String > > {
551
553
match * self {
552
554
NamesIterNative ( ref mut i) => i. next ( ) . map ( |x| x. map ( |s| s. to_string ( ) ) ) ,
@@ -603,7 +605,9 @@ pub struct RegexSplits<'r, 't> {
603
605
last : uint ,
604
606
}
605
607
606
- impl < ' r , ' t > Iterator < & ' t str > for RegexSplits < ' r , ' t > {
608
+ impl < ' r , ' t > Iterator for RegexSplits < ' r , ' t > {
609
+ type Item = & ' t str ;
610
+
607
611
fn next ( & mut self ) -> Option < & ' t str > {
608
612
let text = self . finder . search ;
609
613
match self . finder . next ( ) {
@@ -638,7 +642,9 @@ pub struct RegexSplitsN<'r, 't> {
638
642
limit : uint ,
639
643
}
640
644
641
- impl < ' r , ' t > Iterator < & ' t str > for RegexSplitsN < ' r , ' t > {
645
+ impl < ' r , ' t > Iterator for RegexSplitsN < ' r , ' t > {
646
+ type Item = & ' t str ;
647
+
642
648
fn next ( & mut self ) -> Option < & ' t str > {
643
649
let text = self . splits . finder . search ;
644
650
if self . cur >= self . limit {
@@ -801,7 +807,9 @@ pub struct SubCaptures<'t> {
801
807
caps : & ' t Captures < ' t > ,
802
808
}
803
809
804
- impl < ' t > Iterator < & ' t str > for SubCaptures < ' t > {
810
+ impl < ' t > Iterator for SubCaptures < ' t > {
811
+ type Item = & ' t str ;
812
+
805
813
fn next ( & mut self ) -> Option < & ' t str > {
806
814
if self . idx < self . caps . len ( ) {
807
815
self . idx += 1 ;
@@ -824,7 +832,9 @@ pub struct SubCapturesPos<'t> {
824
832
caps : & ' t Captures < ' t > ,
825
833
}
826
834
827
- impl < ' t > Iterator < Option < ( uint , uint ) > > for SubCapturesPos < ' t > {
835
+ impl < ' t > Iterator for SubCapturesPos < ' t > {
836
+ type Item = Option < ( uint , uint ) > ;
837
+
828
838
fn next ( & mut self ) -> Option < Option < ( uint , uint ) > > {
829
839
if self . idx < self . caps . len ( ) {
830
840
self . idx += 1 ;
@@ -850,7 +860,9 @@ pub struct FindCaptures<'r, 't> {
850
860
last_end : uint ,
851
861
}
852
862
853
- impl < ' r , ' t > Iterator < Captures < ' t > > for FindCaptures < ' r , ' t > {
863
+ impl < ' r , ' t > Iterator for FindCaptures < ' r , ' t > {
864
+ type Item = Captures < ' t > ;
865
+
854
866
fn next ( & mut self ) -> Option < Captures < ' t > > {
855
867
if self . last_end > self . search . len ( ) {
856
868
return None
@@ -893,7 +905,9 @@ pub struct FindMatches<'r, 't> {
893
905
last_end : uint ,
894
906
}
895
907
896
- impl < ' r , ' t > Iterator < ( uint , uint ) > for FindMatches < ' r , ' t > {
908
+ impl < ' r , ' t > Iterator for FindMatches < ' r , ' t > {
909
+ type Item = ( uint , uint ) ;
910
+
897
911
fn next ( & mut self ) -> Option < ( uint , uint ) > {
898
912
if self . last_end > self . search . len ( ) {
899
913
return None
0 commit comments