Don't be too broad with trait impl
This commit is contained in:
parent
40bcd6b29d
commit
5e14fe0ac6
@ -22,7 +22,7 @@ impl<T: Ord> Merge for Vec<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K: Hash + PartialEq + Eq, V: Merge> Merge for HashMap<K, V> {
|
impl<K: Hash + PartialEq + Eq, T: Ord> Merge for HashMap<K, Vec<T>> {
|
||||||
fn merge_in_place(&mut self, mut other: Self) {
|
fn merge_in_place(&mut self, mut other: Self) {
|
||||||
for (other_key, other_value) in other.drain() {
|
for (other_key, other_value) in other.drain() {
|
||||||
if let Some(ref mut value) = self.get_mut(&other_key) {
|
if let Some(ref mut value) = self.get_mut(&other_key) {
|
||||||
|
Loading…
Reference in New Issue
Block a user