diff --git a/src/header/internals/vec_map.rs b/src/header/internals/vec_map.rs index 3541c2b4..9ee0c7c9 100644 --- a/src/header/internals/vec_map.rs +++ b/src/header/internals/vec_map.rs @@ -39,14 +39,12 @@ impl VecMap { } #[inline] - pub fn get_mut(&mut self, key: &K2) -> Option<&mut V> - where K2: PartialEq { + pub fn get_mut + ?Sized>(&mut self, key: &K2) -> Option<&mut V> { self.find(key).map(move |pos| &mut self.vec[pos].1) } #[inline] - pub fn contains_key(&self, key: &K2) -> bool - where K2: PartialEq { + pub fn contains_key + ?Sized>(&self, key: &K2) -> bool { self.find(key).is_some() } @@ -67,8 +65,7 @@ impl VecMap { } #[inline] - fn find(&self, key: &K2) -> Option - where K2: PartialEq + ?Sized { + fn find + ?Sized>(&self, key: &K2) -> Option { self.vec.iter().position(|entry| key == &entry.0) } }