summaryrefslogtreecommitdiff
path: root/src/works/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/works/mod.rs')
-rw-r--r--src/works/mod.rs4
1 files changed, 2 insertions, 2 deletions
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<Self> {
- serde_json::from_reader(std::io::BufReader::new(&file))
+ fn new_from_file(file: &std::fs::File) -> Result<Self> {
+ serde_json::from_reader(std::io::BufReader::new(file))
// add error context
.with_context(|| format!("Failed to create works from {:?}", &file))
}