Only print values in the Debug of HashMap::ValuesMut struct
This commit is contained in:
parent
a313abe3ba
commit
456738e3d1
|
@ -1885,13 +1885,9 @@ impl<K, V> ExactSizeIterator for ValuesMut<'_, K, V> {
|
||||||
impl<K, V> FusedIterator for ValuesMut<'_, K, V> {}
|
impl<K, V> FusedIterator for ValuesMut<'_, K, V> {}
|
||||||
|
|
||||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||||
impl<K, V> fmt::Debug for ValuesMut<'_, K, V>
|
impl<K, V: fmt::Debug> fmt::Debug for ValuesMut<'_, K, V> {
|
||||||
where
|
|
||||||
K: fmt::Debug,
|
|
||||||
V: fmt::Debug,
|
|
||||||
{
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.debug_list().entries(self.inner.iter()).finish()
|
f.debug_list().entries(self.inner.iter().map(|(_, val)| val)).finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue