From c8393e29b93a0d36b35134cfa12b9e4cbd41a62a Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Sat, 3 Jun 2023 15:05:57 +0200 Subject: Refactor standard library paths to mod tops + Add missing json extension to file path --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e2aab81..8fbb920 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +use std::fs::write; + use anyhow::{Context, Ok, Result}; use tera::Tera; @@ -14,7 +16,7 @@ fn main() -> Result<()> { let output = tera .render("index.html", &tera::Context::new()) .context("Failed to render index.html")?; - std::fs::write("docs/index.html", output).context("Failed to write index.html")?; + write("docs/index.html", output).context("Failed to write index.html")?; // render pages for stories Stories::new_from_file("stories")? -- cgit v1.2.3