From 0636a4290f37d086f1a1c9618222736f4fb04c41 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 4 May 2024 11:31:26 +0900 Subject: [PATCH] refactor(header): remove multiple bound location --- src/header/map.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/header/map.rs b/src/header/map.rs index 0b5beb3d..a668b311 100644 --- a/src/header/map.rs +++ b/src/header/map.rs @@ -1449,9 +1449,9 @@ impl HeaderMap { } #[inline] - fn find(&self, key: &K) -> Option<(usize, usize)> + fn find(&self, key: &K) -> Option<(usize, usize)> where - K: Hash + Into, + K: Hash + Into + ?Sized, HeaderName: PartialEq, { if self.entries.is_empty() { @@ -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(danger: &Danger, k: &K) -> HashValue +fn hash_elem_using(danger: &Danger, k: &K) -> HashValue where - K: Hash, + K: Hash + ?Sized, { use fnv::FnvHasher;