Skip to content

Commit

Permalink
Merge pull request #181 from anthok/debug-non-default-hasher
Browse files Browse the repository at this point in the history
fix: adding BuildHasher trait bound to Debug for LruCache
  • Loading branch information
jeromefroe committed Oct 3, 2023
2 parents df4d782 + f4bff88 commit 56507ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ impl<'a, K: Hash + Eq, V, S: BuildHasher> IntoIterator for &'a mut LruCache<K, V
unsafe impl<K: Send, V: Send, S: Send> Send for LruCache<K, V, S> {}
unsafe impl<K: Sync, V: Sync, S: Sync> Sync for LruCache<K, V, S> {}

impl<K: Hash + Eq, V> fmt::Debug for LruCache<K, V> {
impl<K: Hash + Eq, V, S: BuildHasher> fmt::Debug for LruCache<K, V, S> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("LruCache")
.field("len", &self.len())
Expand Down

0 comments on commit 56507ba

Please sign in to comment.