Streamline adding new URL types #122

Merged
wojtek merged 7 commits from 117---streamline-adding-new-url-types into main 2024-02-09 18:41:21 +01:00
Showing only changes of commit 5e14fe0ac6 - Show all commits

View File

@ -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

Is it possible to have a blanket merge with specialisations for ones that implement merge?

Is it possible to have a blanket merge with specialisations for ones that implement merge?
fn merge_in_place(&mut self, mut other: Self) {
for (other_key, other_value) in other.drain() {
if let Some(ref mut value) = self.get_mut(&other_key) {