@@ -368,7 +368,16 @@ impl<I> DoubleEndedIterator for Rev<I> where I: DoubleEndedIterator {
368
368
369
369
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
370
370
impl < 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
+ }
372
381
373
382
#[ unstable( feature = "fused" , issue = "35602" ) ]
374
383
impl < I > FusedIterator for Rev < I >
@@ -425,7 +434,15 @@ impl<'a, I, T: 'a> DoubleEndedIterator for Cloned<I>
425
434
#[ stable( feature = "iter_cloned" , since = "1.1.0" ) ]
426
435
impl < ' a , I , T : ' a > ExactSizeIterator for Cloned < I >
427
436
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
+ }
429
446
430
447
#[ unstable( feature = "fused" , issue = "35602" ) ]
431
448
impl < ' a , I , T : ' a > FusedIterator for Cloned < I >
@@ -1007,7 +1024,16 @@ impl<B, I: DoubleEndedIterator, F> DoubleEndedIterator for Map<I, F> where
1007
1024
1008
1025
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1009
1026
impl < 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
+ }
1011
1037
1012
1038
#[ unstable( feature = "fused" , issue = "35602" ) ]
1013
1039
impl < B , I : FusedIterator , F > FusedIterator for Map < I , F >
@@ -1236,7 +1262,15 @@ impl<I> DoubleEndedIterator for Enumerate<I> where
1236
1262
}
1237
1263
1238
1264
#[ 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
+ }
1240
1274
1241
1275
#[ doc( hidden) ]
1242
1276
unsafe impl < I > TrustedRandomAccess for Enumerate < I >
@@ -1927,7 +1961,15 @@ impl<I> DoubleEndedIterator for Fuse<I>
1927
1961
1928
1962
1929
1963
#[ 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
+ }
1931
1973
1932
1974
/// An iterator that calls a function with a reference to each element before
1933
1975
/// yielding it.
@@ -1994,7 +2036,16 @@ impl<I: DoubleEndedIterator, F> DoubleEndedIterator for Inspect<I, F>
1994
2036
1995
2037
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1996
2038
impl < 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
+ }
1998
2049
1999
2050
#[ unstable( feature = "fused" , issue = "35602" ) ]
2000
2051
impl < I : FusedIterator , F > FusedIterator for Inspect < I , F >
0 commit comments