You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For HashMap, we have ValuesMut struct as the return type of HashMap::values_mut method. Although, it return an iterator over values of the map, its Debug implementation prints both keys and values because of the implementation detail. We should only print values for this struct.
For BTreeMap, we also have ValuesMut struct for BTreeMap::values_mut method. We directly derive Debug for it. Which also means that Debug prints both keys and values. We should manually implement Debug instead and print only the values.
In addition to that, for BTreeMap, we also need to change IntoKeys and IntoValues structs. This is not an issue on HashMap because it was correctly implemented in the first place. But it wasn't for BTreeMap because we need an IntoIter::iter method for this first. So we should implement this and fix this issue for them as well.
This was discovered during #75163 and will be the follow-up of it.
The text was updated successfully, but these errors were encountered:
For
HashMap
, we haveValuesMut
struct as the return type ofHashMap::values_mut
method. Although, it return an iterator over values of the map, its Debug implementation prints both keys and values because of the implementation detail. We should only print values for this struct.For
BTreeMap
, we also haveValuesMut
struct forBTreeMap::values_mut
method. We directly derive Debug for it. Which also means that Debug prints both keys and values. We should manually implement Debug instead and print only the values.In addition to that, for BTreeMap, we also need to change IntoKeys and IntoValues structs. This is not an issue on HashMap because it was correctly implemented in the first place. But it wasn't for BTreeMap because we need an
IntoIter::iter
method for this first. So we should implement this and fix this issue for them as well.This was discovered during #75163 and will be the follow-up of it.
The text was updated successfully, but these errors were encountered: