Skip to content

Commit

Permalink
Implement Debug on FrozenMap
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Dec 10, 2024
1 parent eb67ba0 commit d9674d9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/map/frozen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use std::hash::{BuildHasher, Hash};
use std::{
fmt,
hash::{BuildHasher, Hash},
};

use bumpalo::Bump;
use hashbrown::{
Expand Down Expand Up @@ -250,6 +253,12 @@ impl<'bump, K, V, S> FrozenMap<'_, 'bump, K, V, S> {
}
}

impl<K: fmt::Debug, V: fmt::Debug, S> fmt::Debug for FrozenMap<'_, '_, K, V, S> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("FrozenMap").field(&self.0).finish()
}
}

/// A builder for computing where in a `HashMap` a key-value pair would be stored.
///
/// See the [`hashbrown::HashMap::raw_entry_mut`] docs for usage examples.
Expand Down

0 comments on commit d9674d9

Please sign in to comment.