correct parse signature
This commit is contained in:
parent
d8bd4aa1f0
commit
d7a364b1af
|
@ -60,7 +60,7 @@ impl<'a> TeraParser<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Parse for TeraParser<'a> {
|
impl<'a> Parse for TeraParser<'a> {
|
||||||
fn parse(&mut self, path: &str, src: &[u8], dst: &mut Vec<u8>) -> std::io::Result<()> {
|
fn parse(&mut self, path: &str, src: &[u8], dst: &mut Vec<u8>) -> Result<(), roxy_core::error::Error> {
|
||||||
// TODO: This error is a hack
|
// TODO: This error is a hack
|
||||||
let err = |e: tera::Error| {
|
let err = |e: tera::Error| {
|
||||||
println!("{e:?}");
|
println!("{e:?}");
|
||||||
|
@ -79,7 +79,9 @@ impl<'a> Parse for TeraParser<'a> {
|
||||||
|
|
||||||
self.tera
|
self.tera
|
||||||
.render_to(path, self.context.unwrap_or(&DEFAULT_CONTEXT), dst)
|
.render_to(path, self.context.unwrap_or(&DEFAULT_CONTEXT), dst)
|
||||||
.map_err(err)
|
.map_err(err)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue