From d31bbeae2120db778ae4e1784cb0cc64bf64e305 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 24 Jul 2021 19:01:41 +0100 Subject: [PATCH] config: fix some reporting Signed-off-by: Ian Jackson --- src/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 0582e12..83b1b1c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -126,6 +126,7 @@ pub use SectionName as SN; struct RawVal { raw: Option, loc: Arc } type SectionMap = HashMap; +#[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(&self, f: F) -> T where F: FnOnce(Option<&'v str>) -> Result { f(self.raw) - .with_context(|| format!(r#"file {:?}, section "{:?}", key "{}"#, + .with_context(|| format!(r#"file {:?}, section "{:?}", key "{}""#, self.loc, self.section, self.key))? } } -- 2.30.2