pub(crate) fn ordered_map<K, V, S>(map: &HashMap<K, V>, serializer: S) -> Result<S::Ok, S::Error>
    where S: Serializer, K: Eq + Hash + Ord + Serialize, V: Serialize
{
    let ordered: BTreeMap<_, _> = map.iter().collect();
    ordered.serialize(serializer)
}
/// Serialize the provided map in natural key order, so that it's deterministic when dumping.
Serialize the provided map in natural key order, so that it's deterministic when dumping.
Serialize the provided map in natural key order so that it ' s deterministic when dumping .
pub(crate) fn ordered_map<K, V, S>(map: &HashMap<K, V>, serializer: S) -> Result<S::Ok, S::Error>
    where S: Serializer, K: Eq + Hash + Ord + Serialize, V: Serialize
{
    let ordered: BTreeMap<_, _> = map.iter().collect();
    ordered.serialize(serializer)
}
pub ( crate ) fn ordered_map < K , V , S > ( map : & HashMap < K , V > , serializer : S ) -> Result < S :: Ok , S :: Error > where S : Serializer , K : Eq + Hash + Ord + Serialize , V : Serialize { let ordered : BTreeMap < _ , _ > = map . iter ( ) . collect ( ) ; ordered . serialize ( serializer ) }
Serialize the provided map in natural key order, so that it's deterministic when dumping.
Serialize the provided map in natural key order so that it ' s deterministic when dumping .
map
&HashMap<K, V>
serializer
S
map
&HashMap<K, V>
serializer
S