From afcdd26dbf918eec194e7344be72c6cb65faf0b1 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Sun, 21 May 2023 17:13:07 +0200 Subject: Add 'Wege zum Tod' + Fix not being able to add new story due to HTML last modification detection expecting it --- src/works/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/works/mod.rs') diff --git a/src/works/mod.rs b/src/works/mod.rs index 989f337..cb82168 100644 --- a/src/works/mod.rs +++ b/src/works/mod.rs @@ -7,8 +7,8 @@ pub mod stories; pub trait Works: for<'a> Deserialize<'a> + Serialize { // create works from the corresponding JSON file, // e.g. stories from stories.json - fn new_from_file(file: std::fs::File) -> Result { - serde_json::from_reader(std::io::BufReader::new(&file)) + fn new_from_file(file: &std::fs::File) -> Result { + serde_json::from_reader(std::io::BufReader::new(file)) // add error context .with_context(|| format!("Failed to create works from {:?}", &file)) } -- cgit v1.2.3