@@ -368,7 +368,16 @@ impl<I> DoubleEndedIterator for Rev<I> where I: DoubleEndedIterator {
368368
369369#[ stable( feature = "rust1" , since = "1.0.0" ) ]
370370impl < I > ExactSizeIterator for Rev < I >
371- where I : ExactSizeIterator + DoubleEndedIterator { }
371+ where I : ExactSizeIterator + DoubleEndedIterator
372+ {
373+ fn len ( & self ) -> usize {
374+ self . iter . len ( )
375+ }
376+
377+ fn is_empty ( & self ) -> bool {
378+ self . iter . is_empty ( )
379+ }
380+ }
372381
373382#[ unstable( feature = "fused" , issue = "35602" ) ]
374383impl < I > FusedIterator for Rev < I >
@@ -425,7 +434,15 @@ impl<'a, I, T: 'a> DoubleEndedIterator for Cloned<I>
425434#[ stable( feature = "iter_cloned" , since = "1.1.0" ) ]
426435impl < ' a , I , T : ' a > ExactSizeIterator for Cloned < I >
427436 where I : ExactSizeIterator < Item =& ' a T > , T : Clone
428- { }
437+ {
438+ fn len ( & self ) -> usize {
439+ self . it . len ( )
440+ }
441+
442+ fn is_empty ( & self ) -> bool {
443+ self . it . is_empty ( )
444+ }
445+ }
429446
430447#[ unstable( feature = "fused" , issue = "35602" ) ]
431448impl < ' a , I , T : ' a > FusedIterator for Cloned < I >
@@ -1007,7 +1024,16 @@ impl<B, I: DoubleEndedIterator, F> DoubleEndedIterator for Map<I, F> where
10071024
10081025#[ stable( feature = "rust1" , since = "1.0.0" ) ]
10091026impl < B , I : ExactSizeIterator , F > ExactSizeIterator for Map < I , F >
1010- where F : FnMut ( I :: Item ) -> B { }
1027+ where F : FnMut ( I :: Item ) -> B
1028+ {
1029+ fn len ( & self ) -> usize {
1030+ self . iter . len ( )
1031+ }
1032+
1033+ fn is_empty ( & self ) -> bool {
1034+ self . iter . is_empty ( )
1035+ }
1036+ }
10111037
10121038#[ unstable( feature = "fused" , issue = "35602" ) ]
10131039impl < B , I : FusedIterator , F > FusedIterator for Map < I , F >
@@ -1236,7 +1262,15 @@ impl<I> DoubleEndedIterator for Enumerate<I> where
12361262}
12371263
12381264#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1239- impl < I > ExactSizeIterator for Enumerate < I > where I : ExactSizeIterator { }
1265+ impl < I > ExactSizeIterator for Enumerate < I > where I : ExactSizeIterator {
1266+ fn len ( & self ) -> usize {
1267+ self . iter . len ( )
1268+ }
1269+
1270+ fn is_empty ( & self ) -> bool {
1271+ self . iter . is_empty ( )
1272+ }
1273+ }
12401274
12411275#[ doc( hidden) ]
12421276unsafe impl < I > TrustedRandomAccess for Enumerate < I >
@@ -1927,7 +1961,15 @@ impl<I> DoubleEndedIterator for Fuse<I>
19271961
19281962
19291963#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1930- impl < I > ExactSizeIterator for Fuse < I > where I : ExactSizeIterator { }
1964+ impl < I > ExactSizeIterator for Fuse < I > where I : ExactSizeIterator {
1965+ fn len ( & self ) -> usize {
1966+ self . iter . len ( )
1967+ }
1968+
1969+ fn is_empty ( & self ) -> bool {
1970+ self . iter . is_empty ( )
1971+ }
1972+ }
19311973
19321974/// An iterator that calls a function with a reference to each element before
19331975/// yielding it.
@@ -1994,7 +2036,16 @@ impl<I: DoubleEndedIterator, F> DoubleEndedIterator for Inspect<I, F>
19942036
19952037#[ stable( feature = "rust1" , since = "1.0.0" ) ]
19962038impl < I : ExactSizeIterator , F > ExactSizeIterator for Inspect < I , F >
1997- where F : FnMut ( & I :: Item ) { }
2039+ where F : FnMut ( & I :: Item )
2040+ {
2041+ fn len ( & self ) -> usize {
2042+ self . iter . len ( )
2043+ }
2044+
2045+ fn is_empty ( & self ) -> bool {
2046+ self . iter . is_empty ( )
2047+ }
2048+ }
19982049
19992050#[ unstable( feature = "fused" , issue = "35602" ) ]
20002051impl < I : FusedIterator , F > FusedIterator for Inspect < I , F >
0 commit comments