fuck it, tera too

This commit is contained in:
KitsuneCafe 2024-02-01 14:52:20 -05:00
parent f66b69ffc1
commit a22536fadc
1 changed files with 3 additions and 3 deletions

View File

@ -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)
}
}