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:
614cae1
)
config: fix some reporting
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 18:01:41 +0000
(19:01 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 18:01:41 +0000
(19:01 +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 0582e1222bd490173fea3085cccc450486591daf..83b1b1c426b3c7d0906677300278c6234d0734bf 100644
(file)
--- a/
src/config.rs
+++ b/
src/config.rs
@@
-126,6
+126,7
@@
pub use SectionName as SN;
struct RawVal { raw: Option<String>, loc: Arc<PathBuf> }
type SectionMap = HashMap<String, RawVal>;
+#[derive(Debug)]
struct RawValRef<'v,'l,'s> {
raw: Option<&'v str>,
key: &'static str,
@@
-138,7
+139,7
@@
impl<'v> RawValRef<'v,'_,'_> {
fn try_map<F,T>(&self, f: F) -> T
where F: FnOnce(Option<&'v str>) -> Result<T, AE> {
f(self.raw)
- .with_context(|| format!(r#"file {:?}, section "{:?}", key "{}"#,
+ .with_context(|| format!(r#"file {:?}, section "{:?}", key "{}"
"
#,
self.loc, self.section, self.key))?
}
}