From d7a364b1af1c2ec400d951fcd41560f929feb12c Mon Sep 17 00:00:00 2001 From: KitsuneCafe <10284516+kitsunecafe@users.noreply.github.com> Date: Sun, 4 Feb 2024 05:56:27 -0500 Subject: [PATCH] correct parse signature --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1145e07..c81bce1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,7 +60,7 @@ impl<'a> TeraParser<'a> { } impl<'a> Parse for TeraParser<'a> { - fn parse(&mut self, path: &str, src: &[u8], dst: &mut Vec) -> std::io::Result<()> { + fn parse(&mut self, path: &str, src: &[u8], dst: &mut Vec) -> Result<(), roxy_core::error::Error> { // TODO: This error is a hack let err = |e: tera::Error| { println!("{e:?}"); @@ -79,7 +79,9 @@ impl<'a> Parse for TeraParser<'a> { self.tera .render_to(path, self.context.unwrap_or(&DEFAULT_CONTEXT), dst) - .map_err(err) + .map_err(err)?; + + Ok(()) } }