@@ -984,7 +984,12 @@ impl<K, V> ExactSizeIterator for ValuesMut<'_, K, V> {
984
984
985
985
impl < K , V > FusedIterator for ValuesMut < ' _ , K , V > { }
986
986
987
- // TODO: `impl Debug for ValuesMut` once we have MSRV 1.53 for `slice::IterMut::as_slice`
987
+ impl < K , V : fmt:: Debug > fmt:: Debug for ValuesMut < ' _ , K , V > {
988
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
989
+ let iter = self . iter . as_slice ( ) . iter ( ) . map ( Bucket :: value_ref) ;
990
+ f. debug_list ( ) . entries ( iter) . finish ( )
991
+ }
992
+ }
988
993
989
994
/// An owning iterator over the values of a `IndexMap`.
990
995
///
@@ -1095,7 +1100,12 @@ impl<K, V> ExactSizeIterator for IterMut<'_, K, V> {
1095
1100
1096
1101
impl < K , V > FusedIterator for IterMut < ' _ , K , V > { }
1097
1102
1098
- // TODO: `impl Debug for IterMut` once we have MSRV 1.53 for `slice::IterMut::as_slice`
1103
+ impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for IterMut < ' _ , K , V > {
1104
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1105
+ let iter = self . iter . as_slice ( ) . iter ( ) . map ( Bucket :: refs) ;
1106
+ f. debug_list ( ) . entries ( iter) . finish ( )
1107
+ }
1108
+ }
1099
1109
1100
1110
/// An owning iterator over the entries of a `IndexMap`.
1101
1111
///
0 commit comments