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 crateTryFromPatch;
// Vec<T> conversions
// #[cfg(feature = "indexmap")]
// impl<K1, V1, K2: TryFromPatch<K1>, V2: TryFromPatch<V1>>
// TryFromPatch<indexmap::IndexMap<K1, V1>> for Vec<(K2, V2)>
// {
// fn try_from_value(v: indexmap::IndexMap<K1, V1>) -> Option<Self> {
// let mut new = Self::new();
// for (k, v) in v {
// new.push((K2::try_from_value(k)?, V2::try_from_value(v)?));
// }
// Some(new)
// }
// }
// #[cfg(feature = "indexmap")]
// impl<
// K1,
// V1,
// K2: core::hash::Hash + Eq + TryFromPatch<K1>,
// V2: TryFromPatch<V1>,
// > TryFromPatch<Vec<(K1, V1)>> for indexmap::IndexMap<K2, V2>
// {
// fn try_from_value(v: Vec<(K1, V1)>) -> Option<Self> {
// let mut new = Self::new();
// for (k, v) in v {
// new.insert(K2::try_from_value(k)?, V2::try_from_value(v)?);
// }
// Some(new)
// }
// }