summaryrefslogtreecommitdiffstats
path: root/src/file/format/ini.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/file/format/ini.rs')
-rw-r--r--src/file/format/ini.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file/format/ini.rs b/src/file/format/ini.rs
index b45695a..47f3499 100644
--- a/src/file/format/ini.rs
+++ b/src/file/format/ini.rs
@@ -1,4 +1,4 @@
-use std::collections::HashMap;
+use linked_hash_map::LinkedHashMap;
use std::error::Error;
use ini::Ini;
@@ -8,13 +8,13 @@ use crate::value::{Value, ValueKind};
pub fn parse(
uri: Option<&String>,
text: &str,
-) -> Result<HashMap<String, Value>, Box<dyn Error + Send + Sync>> {
- let mut map: HashMap<String, Value> = HashMap::new();
+) -> Result<LinkedHashMap<String, Value>, Box<dyn Error + Send + Sync>> {
+ let mut map: LinkedHashMap<String, Value> = LinkedHashMap::new();
let i = Ini::load_from_str(text)?;
for (sec, prop) in i.iter() {
match sec {
Some(sec) => {
- let mut sec_map: HashMap<String, Value> = HashMap::new();
+ let mut sec_map: LinkedHashMap<String, Value> = LinkedHashMap::new();
for (k, v) in prop.iter() {
sec_map.insert(
k.to_owned(),