Skip to content

Commit

Permalink
style(header): remove ?Sized from where class to fix 1.10 build
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Apr 26, 2017
1 parent 5130fa4 commit 9ab67b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/header/internals/vec_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ impl<K: PartialEq, V> VecMap<K, V> {
}

#[inline]
pub fn get<K2>(&self, key: &K2) -> Option<&V>
where K2: PartialEq<K> + ?Sized {
pub fn get<K2: PartialEq<K> + ?Sized>(&self, key: &K2) -> Option<&V> {
self.find(key).map(move |pos| &self.vec[pos].1)
}

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

0 comments on commit 9ab67b7

Please sign in to comment.