Skip to content

Commit f707b25

Browse files
sakexmgeisler
andauthored
Update mdbook-tera-backend/src/tera_renderer/renderer.rs
Co-authored-by: Martin Geisler <[email protected]>
1 parent d801031 commit f707b25

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mdbook-tera-backend/src/tera_renderer/renderer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ impl Renderer {
107107
}
108108
let file_content = std::fs::read_to_string(path)?;
109109
let output = self.render_file_content(&file_content, path)?;
110-
let mut output_file = fs::File::create(path)?;
111-
output_file.write_all(output.as_bytes())?;
112-
Ok(())
110+
fs::write(path, output)
113111
}
114112

115113
/// Creates the rendering context to be passed to the templates.

0 commit comments

Comments
 (0)