@@ -207,7 +207,7 @@ pub struct ByteIter<'b> {
207
207
impl < ' b > Iterator for ByteIter < ' b > {
208
208
type Item = u8 ;
209
209
fn next ( & mut self ) -> Option < u8 > { self . iter . next ( ) . copied ( ) }
210
- fn size_hint ( & self ) -> ( usize , Option < usize > ) { ( self . len ( ) , Some ( self . len ( ) ) ) }
210
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) { self . iter . size_hint ( ) }
211
211
}
212
212
213
213
impl < ' b > ExactSizeIterator for ByteIter < ' b > {
@@ -230,7 +230,7 @@ pub struct CharIter<'b> {
230
230
impl < ' b > Iterator for CharIter < ' b > {
231
231
type Item = char ;
232
232
fn next ( & mut self ) -> Option < char > { self . iter . next ( ) . map ( Into :: into) }
233
- fn size_hint ( & self ) -> ( usize , Option < usize > ) { ( self . len ( ) , Some ( self . len ( ) ) ) }
233
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) { self . iter . size_hint ( ) }
234
234
}
235
235
236
236
impl < ' b > ExactSizeIterator for CharIter < ' b > {
@@ -253,7 +253,7 @@ impl<'b> Iterator for LowercaseByteIter<'b> {
253
253
fn next ( & mut self ) -> Option < u8 > {
254
254
self . iter . next ( ) . map ( |b| if is_ascii_uppercase ( b) { b | 32 } else { b } )
255
255
}
256
- fn size_hint ( & self ) -> ( usize , Option < usize > ) { ( self . len ( ) , Some ( self . len ( ) ) ) }
256
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) { self . iter . size_hint ( ) }
257
257
}
258
258
259
259
impl < ' b > ExactSizeIterator for LowercaseByteIter < ' b > {
@@ -276,7 +276,7 @@ pub struct LowercaseCharIter<'b> {
276
276
impl < ' b > Iterator for LowercaseCharIter < ' b > {
277
277
type Item = char ;
278
278
fn next ( & mut self ) -> Option < char > { self . iter . next ( ) . map ( Into :: into) }
279
- fn size_hint ( & self ) -> ( usize , Option < usize > ) { ( self . len ( ) , Some ( self . len ( ) ) ) }
279
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) { self . iter . size_hint ( ) }
280
280
}
281
281
282
282
impl < ' b > ExactSizeIterator for LowercaseCharIter < ' b > {
0 commit comments