src/backend/render.rs: stupidity
This commit is contained in:
@@ -131,7 +131,9 @@ impl Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Render a page to a Write-able stream
|
/// Render a page to a Write-able stream
|
||||||
pub fn render<W: Write>(&self, mut dest: W) -> Result<(), Box<dyn Error>> {
|
pub fn render<W: Write>(
|
||||||
|
&self, dest: &mut W
|
||||||
|
) -> Result<(), Box<dyn Error>> {
|
||||||
/* TODO: replace ./assets/ with the actual templates directory,
|
/* TODO: replace ./assets/ with the actual templates directory,
|
||||||
* i.e. /usr/local/share/mintee/ */
|
* i.e. /usr/local/share/mintee/ */
|
||||||
let tera = Tera::new("./assets/templates/**/*")?;
|
let tera = Tera::new("./assets/templates/**/*")?;
|
||||||
|
|||||||
@@ -48,5 +48,5 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
||||||
page.render(stdout())
|
page.render(&mut stdout())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user