Improve Debug implementations of OccupiedError.
This commit is contained in:
parent
f6fe24aab3
commit
69d95e232a
2 changed files with 14 additions and 3 deletions
|
@ -86,8 +86,9 @@ pub struct OccupiedError<'a, K: 'a, V: 'a> {
|
|||
impl<K: Debug + Ord, V: Debug> Debug for OccupiedError<'_, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("OccupiedError")
|
||||
.field("entry", &self.entry)
|
||||
.field("value", &self.value)
|
||||
.field("key", self.entry.key())
|
||||
.field("old_value", self.entry.get())
|
||||
.field("new_value", &self.value)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue