diff options
author | David Orchard <if_coding@fastmail.com> | 2021-08-01 00:11:40 -0700 |
---|---|---|
committer | David Orchard <if_coding@fastmail.com> | 2021-08-15 10:32:07 -0700 |
commit | ea62693f6fff0dd24865b934334260d06f190e01 (patch) | |
tree | 7a071eea0dcb2630bd8ca018fdffca350e8adeac | |
parent | cc0530a7716779f954b1756905a9f4ceb7eb6d62 (diff) |
Switch from LinkedHashMap to IndexMap
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | src/builder.rs | 1 | ||||
-rw-r--r-- | src/map.rs | 2 |
3 files changed, 3 insertions, 4 deletions
@@ -21,7 +21,7 @@ yaml = ["yaml-rust"] hjson = ["serde-hjson"] ini = ["rust-ini"] json5 = ["json5_rs"] -preserve_order = ["linked-hash-map", "toml/preserve_order", "serde_json/preserve_order", "ron/indexmap"] +preserve_order = ["indexmap", "toml/preserve_order", "serde_json/preserve_order", "ron/indexmap"] [dependencies] async-trait = "0.1.50" @@ -36,7 +36,7 @@ serde-hjson = { version = "0.9", default-features = false, optional = true } rust-ini = { version = "0.17", optional = true } ron = { version = "0.6", optional = true } json5_rs = { version = "0.3", optional = true, package = "json5" } -linked-hash-map = { version = "0.5.4", optional = true, features = ["serde_impl"] } +indexmap = { version = "1.7.0", features = ["serde-1"], optional = true} [dev-dependencies] serde_derive = "1.0.8" diff --git a/src/builder.rs b/src/builder.rs index 5100f5f..0cbd32a 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -1,7 +1,6 @@ use std::iter::IntoIterator; use std::str::FromStr; - use crate::error::Result; use crate::map::MapImpl; use crate::source::AsyncSource; @@ -1,4 +1,4 @@ #[cfg(not(feature = "preserve_order"))] pub type MapImpl<K, V> = std::collections::HashMap<K, V>; #[cfg(feature = "preserve_order")] -pub type MapImpl<K, V> = linked_hash_map::LinkedHashMap<K, V>; +pub type MapImpl<K, V> = indexmap::IndexMap<K, V>; |