1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// use std::{collections::HashMap, hash::BuildHasher};
// impl<
// K1: core::cmp::Eq + core::hash::Hash + TryFromPatch<K2>,
// K2: Clone,
// V1: TryFromPatch<V2>,
// V2: Clone,
// S: BuildHasher + Default,
// > TryFromPatch<HashMap<K2, V2, S>> for HashMap<K1, V1, S>
// {
// fn try_from_value(value: HashMap<K2, V2, S>) -> Option<Self> {
// let mut new = Self::with_hasher(S::default());
// for (key, item) in value {
// new.insert(K1::try_from_value(key)?, V1::try_from_value(item)?);
// }
// Some(new)
// }
// }
use BTreeMap;
use crate::;
// TODO: Implement all functions from FromPatch here as well