Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
}
pub use SectionName as SN;
-type SectionMap = HashMap<String, Option<String>>;
+type SectionMap = HashMap<SectionName, Option<String>>;
pub struct Config {
opts: Opts,
// xxx parse section names here
// xxx save Arc<PathBuf> where we found each item
- self.sections.extend(map.drain());
+ for (sn, vars) in map.drain() {
+ let sn = sn.parse().dcontext(&sn)?;
+ self.sections.entry(sn)
+ .or_default()
+ .extend(vars);
+ }
None
}