summaryrefslogtreecommitdiffstats
path: root/src/path
diff options
context:
space:
mode:
authorDavid Orchard <if_coding@fastmail.com>2021-08-01 00:03:10 -0700
committerDavid Orchard <if_coding@fastmail.com>2021-08-15 10:31:58 -0700
commitcc0530a7716779f954b1756905a9f4ceb7eb6d62 (patch)
tree311b2ca44a282bbc629a08123f53a855cba38c1c /src/path
parent622efaca17256fb42dafc61c8df1f3037c1fb772 (diff)
Move order preservation under a feature gate
Diffstat (limited to 'src/path')
-rw-r--r--src/path/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/path/mod.rs b/src/path/mod.rs
index b056467..8ce51f9 100644
--- a/src/path/mod.rs
+++ b/src/path/mod.rs
@@ -1,7 +1,7 @@
-use linked_hash_map::LinkedHashMap;
use std::str::FromStr;
use crate::error::*;
+use crate::map::MapImpl;
use crate::value::{Value, ValueKind};
mod parser;
@@ -135,7 +135,7 @@ impl Expression {
),
_ => {
- *value = LinkedHashMap::<String, Value>::new().into();
+ *value = MapImpl::<String, Value>::new().into();
if let ValueKind::Table(ref mut map) = value.kind {
Some(
@@ -186,7 +186,7 @@ impl Expression {
ValueKind::Table(_) => {}
_ => {
- *root = LinkedHashMap::<String, Value>::new().into();
+ *root = MapImpl::<String, Value>::new().into();
}
}
@@ -195,7 +195,7 @@ impl Expression {
// Pull out another table
let mut target = if let ValueKind::Table(ref mut map) = root.kind {
map.entry(id.clone())
- .or_insert_with(|| LinkedHashMap::<String, Value>::new().into())
+ .or_insert_with(|| MapImpl::<String, Value>::new().into())
} else {
unreachable!();
};
@@ -228,7 +228,7 @@ impl Expression {
_ => {
// Didn't find a table. Oh well. Make a table and do this anyway
- *parent = LinkedHashMap::<String, Value>::new().into();
+ *parent = MapImpl::<String, Value>::new().into();
Expression::Identifier(key.clone()).set(parent, value);
}