Skip to content

Commit

Permalink
minor: Resolve clippy lint about type bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Aug 17, 2024
1 parent 0ba8518 commit 1cdaee8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hash_multi_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ where
self.table.len()
}

pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V>
pub fn get<Q>(&self, k: &Q) -> Option<&V>
where
K: Borrow<Q>,
Q: Hash + Eq,
Q: Hash + Eq + ?Sized,
{
let hash = make_hash(&self.build_hasher, &k);
self.table.find(hash, |(p, _v)| p.borrow() == k).map(|b| {
Expand All @@ -102,10 +102,10 @@ where
})
}

pub fn get_all<'map, 'key, Q: ?Sized>(&'map self, k: &'key Q) -> GetAllIter<'map, 'key, Q, K, V>
pub fn get_all<'map, 'key, Q>(&'map self, k: &'key Q) -> GetAllIter<'map, 'key, Q, K, V>
where
K: Borrow<Q>,
Q: Hash + Eq,
Q: Hash + Eq + ?Sized,
{
let hash = make_hash(&self.build_hasher, k);

Expand Down

0 comments on commit 1cdaee8

Please sign in to comment.