Streamline adding new URL types #122
@ -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>> {
|
||||||
wojtek marked this conversation as resolved
Outdated
|
|||||||
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
Is it possible to have a blanket merge with specialisations for ones that implement merge?