Skip to content

Commit

Permalink
refactor(header): remove multiple bound location
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed May 4, 2024
1 parent 9d319b1 commit d9dc9b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/header/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1449,9 +1449,9 @@ impl<T> HeaderMap<T> {
}

#[inline]
fn find<K: ?Sized>(&self, key: &K) -> Option<(usize, usize)>
fn find<K>(&self, key: &K) -> Option<(usize, usize)>
where
K: Hash + Into<HeaderName>,
K: Hash + Into<HeaderName> + ?Sized,
HeaderName: PartialEq<K>,
{
if self.entries.is_empty() {
Expand Down Expand Up @@ -3603,9 +3603,9 @@ fn probe_distance(mask: Size, hash: HashValue, current: usize) -> usize {
current.wrapping_sub(desired_pos(mask, hash)) & mask as usize
}

fn hash_elem_using<K: ?Sized>(danger: &Danger, k: &K) -> HashValue
fn hash_elem_using<K>(danger: &Danger, k: &K) -> HashValue
where
K: Hash,
K: Hash + ?Sized,
{
use fnv::FnvHasher;

Expand Down

0 comments on commit d9dc9b3

Please sign in to comment.