From 2e86fe6c256b7d41076e8d6e2af64dff0f9f3be6 Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Sat, 27 Jul 2019 20:51:57 +0000 Subject: [PATCH] Require story reference to read from archive --- src/archive/fetcher.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/archive/fetcher.rs b/src/archive/fetcher.rs index db7c1b1..002d3e1 100644 --- a/src/archive/fetcher.rs +++ b/src/archive/fetcher.rs @@ -74,9 +74,11 @@ where } } - pub fn read(&self, path: &str) -> Result> { + pub fn read(&self, story: &Story) -> Result> { use ZipError::*; + let path = &story.archive.path; + let mut archive = self.archive.lock().map_err(|e| match e { _ => Error::archive("Could not acquire fetcher lock"), })?;