@@ -750,9 +750,13 @@ impl<'a, K, V> DoubleEndedIterator for IterMut<'a, K, V> {
750
750
}
751
751
}
752
752
753
- impl < ' a , K , V > ExactSizeIterator for Iter < ' a , K , V > { }
753
+ impl < ' a , K , V > ExactSizeIterator for Iter < ' a , K , V > {
754
+ fn len ( & self ) -> usize { self . remaining }
755
+ }
754
756
755
- impl < ' a , K , V > ExactSizeIterator for IterMut < ' a , K , V > { }
757
+ impl < ' a , K , V > ExactSizeIterator for IterMut < ' a , K , V > {
758
+ fn len ( & self ) -> usize { self . remaining }
759
+ }
756
760
757
761
758
762
pub struct Keys < ' a , K : ' a , V : ' a > {
@@ -774,7 +778,9 @@ impl<'a, K, V> DoubleEndedIterator for Keys<'a, K, V> {
774
778
#[ inline] fn next_back ( & mut self ) -> Option < ( & ' a K ) > { self . inner . next_back ( ) }
775
779
}
776
780
777
- impl < ' a , K , V > ExactSizeIterator for Keys < ' a , K , V > { }
781
+ impl < ' a , K , V > ExactSizeIterator for Keys < ' a , K , V > {
782
+ fn len ( & self ) -> usize { self . inner . len ( ) }
783
+ }
778
784
779
785
780
786
pub struct Values < ' a , K : ' a , V : ' a > {
@@ -796,7 +802,9 @@ impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V> {
796
802
#[ inline] fn next_back ( & mut self ) -> Option < ( & ' a V ) > { self . inner . next_back ( ) }
797
803
}
798
804
799
- impl < ' a , K , V > ExactSizeIterator for Values < ' a , K , V > { }
805
+ impl < ' a , K , V > ExactSizeIterator for Values < ' a , K , V > {
806
+ fn len ( & self ) -> usize { self . inner . len ( ) }
807
+ }
800
808
801
809
impl < ' a , K : Hash + Eq , V , S : HashState > IntoIterator for & ' a LinkedHashMap < K , V , S > {
802
810
type Item = ( & ' a K , & ' a V ) ;
0 commit comments