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