mirror of
https://github.com/openharmony/third_party_rust_indexmap.git
synced 2026-07-19 16:43:59 -04:00
f301065664
Our default serde implementation treats `IndexMap` as a normal map, which is often a nice representation in serialization formats, but they might not preserve the order. This commit adds a `serde_seq` module with `serialize` and `deserialize` functions, which makes it suitable for serde's field attributes, like `#[serde(with = "indexmap::serde_seq")]`. This mode treats `IndexMap` as a sequence of `(key, value)` pairs, which should always preserve order.