From a22536fadc801b9a705471352fa16dcbd4de893d Mon Sep 17 00:00:00 2001 From: KitsuneCafe <10284516+kitsunecafe@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:52:20 -0500 Subject: [PATCH] fuck it, tera too --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3537efa..e02bf03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,12 +2,12 @@ use roxy_core::roxy::Parse; #[derive(Debug)] pub struct TeraParser<'a> { - pub tera: tera::Tera, + pub tera: &'a mut tera::Tera, context: &'a tera::Context, } impl<'a> TeraParser<'a> { - pub fn new(tera: tera::Tera, context: &'a tera::Context) -> Self { + pub fn new(tera: &'a mut tera::Tera, context: &'a tera::Context) -> Self { Self { tera, context } } } @@ -26,7 +26,7 @@ impl<'a> Parse for TeraParser<'a> { .add_raw_template(path, template.as_str()) .map_err(err)?; - self.tera.render_to(path, &self.context, dst).map_err(err) + self.tera.render_to(path, self.context, dst).map_err(err) } }