chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76e9ba3
)
wip parsing, record loc
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 23 Jul 2021 22:29:48 +0000
(23:29 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 23 Jul 2021 22:29:48 +0000
(23:29 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/config.rs
patch
|
blob
|
history
diff --git
a/src/config.rs
b/src/config.rs
index 66325b768088b8ee7d607d6df7383981050e5a4e..8e1f26a57549c4951133ff3fa30091c04f2967ba 100644
(file)
--- a/
src/config.rs
+++ b/
src/config.rs
@@
-67,7
+67,9
@@
pub enum SectionName {
}
pub use SectionName as SN;
-type SectionMap = HashMap<String, (Option<String>, Arc<PathBuf>)>;
+#[derive(Debug,Clone)]
+struct RawVal { val: Option<String>, loc: Arc<PathBuf> }
+type SectionMap = HashMap<String, RawVal>;
pub struct Config {
opts: Opts,
@@
-143,7
+145,7
@@
impl Aggregate {
.or_default()
.extend(
vars.into_iter()
- .map(|(k,v
)| (k, (v, loc.clone())
))
+ .map(|(k,v
al)| (k, RawVal { val, loc: loc.clone() }
))
);
}
None