diff options
author | David Orchard <if_coding@fastmail.com> | 2021-08-01 00:03:10 -0700 |
---|---|---|
committer | David Orchard <if_coding@fastmail.com> | 2021-08-15 10:31:58 -0700 |
commit | cc0530a7716779f954b1756905a9f4ceb7eb6d62 (patch) | |
tree | 311b2ca44a282bbc629a08123f53a855cba38c1c /src/file/format/ini.rs | |
parent | 622efaca17256fb42dafc61c8df1f3037c1fb772 (diff) |
Move order preservation under a feature gate
Diffstat (limited to 'src/file/format/ini.rs')
-rw-r--r-- | src/file/format/ini.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file/format/ini.rs b/src/file/format/ini.rs index 47f3499..b5f742d 100644 --- a/src/file/format/ini.rs +++ b/src/file/format/ini.rs @@ -1,20 +1,20 @@ -use linked_hash_map::LinkedHashMap; use std::error::Error; use ini::Ini; +use crate::map::MapImpl; use crate::value::{Value, ValueKind}; pub fn parse( uri: Option<&String>, text: &str, -) -> Result<LinkedHashMap<String, Value>, Box<dyn Error + Send + Sync>> { - let mut map: LinkedHashMap<String, Value> = LinkedHashMap::new(); +) -> Result<MapImpl<String, Value>, Box<dyn Error + Send + Sync>> { + let mut map: MapImpl<String, Value> = MapImpl::new(); let i = Ini::load_from_str(text)?; for (sec, prop) in i.iter() { match sec { Some(sec) => { - let mut sec_map: LinkedHashMap<String, Value> = LinkedHashMap::new(); + let mut sec_map: MapImpl<String, Value> = MapImpl::new(); for (k, v) in prop.iter() { sec_map.insert( k.to_owned(), |