fix clippy lints and improve error handling
This commit is contained in:
parent
aeaa6eb3a6
commit
dd0ad8d538
5 changed files with 21 additions and 6 deletions
|
@ -348,6 +348,15 @@ fn output_html(
|
|||
}
|
||||
|
||||
std::fs::create_dir_all("output")?;
|
||||
{
|
||||
let temp_path = "output/calendars.html.tmp";
|
||||
let final_path = "output/calendars.html";
|
||||
let mut f = std::fs::File::create(temp_path)?;
|
||||
|
||||
f.write_all("".as_bytes())?;
|
||||
std::fs::rename(temp_path, final_path)?;
|
||||
}
|
||||
|
||||
{
|
||||
let temp_path = "output/index.html.tmp";
|
||||
let final_path = "output/index.html";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue