fuck it, tera too
This commit is contained in:
parent
f66b69ffc1
commit
a22536fadc
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue