src/backend/render.rs: updates to use BufWriter instead of Write trait
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
use std::{
|
||||
error::Error,
|
||||
fmt::{ self, Display, Formatter },
|
||||
io::Write,
|
||||
io::{ BufWriter, Write },
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
@@ -131,8 +131,8 @@ impl Page {
|
||||
}
|
||||
|
||||
/// Render a page to a Write-able stream
|
||||
pub fn render(
|
||||
&self, mut dest: Box<dyn Write>
|
||||
pub fn render<W: Write>(
|
||||
&self, dest: &mut BufWriter<W>
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
/* TODO: replace ./assets/ with the actual templates directory,
|
||||
* i.e. /usr/local/share/mintee/ */
|
||||
|
||||
Reference in New Issue
Block a user