fuckin garbage no-good nonsense my goodnus
(map: &StructyMap, s: S)
| 82 | |
| 83 | // fuckin garbage no-good nonsense my goodnus |
| 84 | fn serialize_structymap<S: Serializer> (map: &StructyMap, s: S) -> Result<S::Ok, S::Error> { |
| 85 | map.iter().map(|(a,b)| (a.clone(),b.clone())).collect::<Vec<(_,_)>>().serialize(s) |
| 86 | } |
| 87 | fn deserialize_structymap<'de, D: Deserializer<'de>>(d: D) -> Result<StructyMap, D::Error> { |
| 88 | let vec = <Vec<(MapLocation, UnitID)>>::deserialize(d)?; |
| 89 | let mut map = StructyMap::default(); |