From 69e9eac947f6f319d3c8889f53da29461ebd6c28 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Sun, 12 Feb 2023 12:42:59 +0100 Subject: Add missing error context + Remove redundant error handling --- src/works/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/works/mod.rs') diff --git a/src/works/mod.rs b/src/works/mod.rs index 1d0b3de..989f337 100644 --- a/src/works/mod.rs +++ b/src/works/mod.rs @@ -18,7 +18,7 @@ pub trait Works: for<'a> Deserialize<'a> + Serialize { fn create_tera_context(&self) -> Result { let mut context = tera::Context::new(); context.insert("works", &self); - Ok(context) + anyhow::Ok(context).with_context(|| "Failed to create works") } // render page for every work -- cgit v1.2.3