diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2023-02-12 12:42:59 +0100 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2023-02-12 12:42:59 +0100 |
| commit | 69e9eac947f6f319d3c8889f53da29461ebd6c28 (patch) | |
| tree | 67ce046ddf3a57507ee7a8144e0c2da52d0cc572 /src/works/mod.rs | |
| parent | 7d9665520e3461c43e3cc1b4f585ed5bbfd13a32 (diff) | |
Add missing error context + Remove redundant error handling
Diffstat (limited to 'src/works/mod.rs')
| -rw-r--r-- | src/works/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<tera::Context> { 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 |
