aboutsummaryrefslogtreecommitdiff
path: root/src/generator/html.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/generator/html.rs')
-rw-r--r--src/generator/html.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/generator/html.rs b/src/generator/html.rs
index ade3eee..0e24e64 100644
--- a/src/generator/html.rs
+++ b/src/generator/html.rs
@@ -1,6 +1,6 @@
use crate::template::{Context, find, parse};
use std::fs::write;
-use std::io::{Error, ErrorKind::Other, Result};
+use std::io::{Error, Result};
use std::path::Path;
const FILENAME: &str = "index.html";
@@ -13,7 +13,7 @@ pub fn generate(
) -> Result<()> {
if let Some(template) = find(template_directory, FILENAME) {
let parsed_template =
- parse(&template).ok_or_else(|| Error::new(Other, "Unable to parse HTML template"))?;
+ parse(&template).ok_or_else(|| Error::other("Unable to parse HTML template"))?;
let rendered_template = parsed_template.render(context)?;
let location = target.join(FILENAME);
write(location, rendered_template)?;