summaryrefslogtreecommitdiffstats
path: root/src/file/mod.rs
diff options
context:
space:
mode:
authorDavid Orchard <if_coding@fastmail.com>2021-07-28 22:52:15 -0700
committerDavid Orchard <if_coding@fastmail.com>2021-08-15 10:31:18 -0700
commitfc8cf0ed674cbb495df1baff34d4b832ca5fad3c (patch)
treea83c82ff11399ebd2da8d7ae58da31b7f295998c /src/file/mod.rs
parent62c84297e5340d717d89c5c0b36ed86dd5ad9d2f (diff)
Use LinkedHashMap in place of HashMap
Diffstat (limited to 'src/file/mod.rs')
-rw-r--r--src/file/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file/mod.rs b/src/file/mod.rs
index b00a271..02fd51f 100644
--- a/src/file/mod.rs
+++ b/src/file/mod.rs
@@ -1,7 +1,7 @@
mod format;
pub mod source;
-use std::collections::HashMap;
+use linked_hash_map::LinkedHashMap;
use std::path::{Path, PathBuf};
use crate::error::*;
@@ -99,7 +99,7 @@ where
Box::new((*self).clone())
}
- fn collect(&self) -> Result<HashMap<String, Value>> {
+ fn collect(&self) -> Result<LinkedHashMap<String, Value>> {
// Coerce the file contents to a string
let (uri, contents, format) = match self
.source
@@ -110,7 +110,7 @@ where
Err(error) => {
if !self.required {
- return Ok(HashMap::new());
+ return Ok(LinkedHashMap::new());
}
return Err(error);