style(header): remove ?Sized from where class to fix 1.10 build

This commit is contained in:
Sean McArthur
2017-04-26 13:58:56 -07:00
parent 5130fa4bad
commit 9ab67b7900

View File

@@ -34,8 +34,7 @@ impl<K: PartialEq, V> VecMap<K, V> {
} }
#[inline] #[inline]
pub fn get<K2>(&self, key: &K2) -> Option<&V> pub fn get<K2: PartialEq<K> + ?Sized>(&self, key: &K2) -> Option<&V> {
where K2: PartialEq<K> + ?Sized {
self.find(key).map(move |pos| &self.vec[pos].1) self.find(key).map(move |pos| &self.vec[pos].1)
} }
@@ -59,8 +58,7 @@ impl<K: PartialEq, V> VecMap<K, V> {
self.vec.iter() self.vec.iter()
} }
#[inline] #[inline]
pub fn remove<K2>(&mut self, key: &K2) -> Option<V> pub fn remove<K2: PartialEq<K> + ?Sized>(&mut self, key: &K2) -> Option<V> {
where K2: PartialEq<K> + ?Sized {
self.find(key).map(|pos| self.vec.remove(pos)).map(|(_, v)| v) self.find(key).map(|pos| self.vec.remove(pos)).map(|(_, v)| v)
} }
#[inline] #[inline]