@@ -1088,10 +1088,7 @@ impl<'a, I> DoubleEndedIterator for ByRef<'a, I> where I: 'a + DoubleEndedIterat
10881088}
10891089
10901090#[ stable]
1091- impl < ' a , I > ExactSizeIterator for ByRef < ' a , I > where I : ' a + ExactSizeIterator {
1092- #[ inline]
1093- fn len ( & self ) -> uint { self . iter . len ( ) }
1094- }
1091+ impl < ' a , I > ExactSizeIterator for ByRef < ' a , I > where I : ' a + ExactSizeIterator { }
10951092
10961093/// A trait for iterators over elements which can be added together
10971094#[ unstable = "needs to be re-evaluated as part of numerics reform" ]
@@ -1797,14 +1794,7 @@ impl<T, I> Iterator for Peekable<T, I> where I: Iterator<Item=T> {
17971794}
17981795
17991796#[ stable]
1800- impl < T , I > ExactSizeIterator for Peekable < T , I > where I : ExactSizeIterator < Item = T > {
1801- #[ inline]
1802- fn len ( & self ) -> usize {
1803- // This is guarenteed to not overflow because `len()` must have been able to return a valid
1804- // value before we peeked.
1805- self . iter . len ( ) + if self . peeked . is_some ( ) { 1 } else { 0 }
1806- }
1807- }
1797+ impl < T , I > ExactSizeIterator for Peekable < T , I > where I : ExactSizeIterator < Item = T > { }
18081798
18091799#[ stable]
18101800impl < T , I > Peekable < T , I > where I : Iterator < Item =T > {
@@ -1999,10 +1989,7 @@ impl<I> RandomAccessIterator for Skip<I> where I: RandomAccessIterator{
19991989}
20001990
20011991#[ stable]
2002- impl < I > ExactSizeIterator for Skip < I > where I : ExactSizeIterator {
2003- #[ inline]
2004- fn len ( & self ) -> uint { self . iter . len ( ) . saturating_sub ( self . n ) }
2005- }
1992+ impl < I > ExactSizeIterator for Skip < I > where I : ExactSizeIterator { }
20061993
20071994/// An iterator that only iterates over the first `n` iterations of `iter`.
20081995#[ derive( Clone ) ]
@@ -2060,10 +2047,7 @@ impl<I> RandomAccessIterator for Take<I> where I: RandomAccessIterator{
20602047}
20612048
20622049#[ stable]
2063- impl < I > ExactSizeIterator for Take < I > where I : ExactSizeIterator {
2064- #[ inline]
2065- fn len ( & self ) -> uint { cmp:: min ( self . iter . len ( ) , self . n ) }
2066- }
2050+ impl < I > ExactSizeIterator for Take < I > where I : ExactSizeIterator { }
20672051
20682052
20692053/// An iterator to maintain state while iterating another iterator
@@ -2275,10 +2259,7 @@ impl<I> RandomAccessIterator for Fuse<I> where I: RandomAccessIterator {
22752259}
22762260
22772261#[ stable]
2278- impl < I > ExactSizeIterator for Fuse < I > where I : ExactSizeIterator {
2279- #[ inline]
2280- fn len ( & self ) -> uint { self . iter . len ( ) }
2281- }
2262+ impl < I > ExactSizeIterator for Fuse < I > where I : ExactSizeIterator { }
22822263
22832264impl < I > Fuse < I > {
22842265 /// Resets the fuse such that the next call to .next() or .next_back() will
0 commit comments