diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2023-06-03 14:33:09 +0200 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2023-06-03 14:33:09 +0200 |
| commit | 30b707d610f4daf025da01b12247bd3b7ebd9e55 (patch) | |
| tree | 2c82ac3ba39af5fde041f074e51b4fb9f56c092f /src/works/stories.rs | |
| parent | 683ca3627f38461cbbdee321a15821b46e72ae6a (diff) | |
Clean command pattern for works
Diffstat (limited to 'src/works/stories.rs')
| -rw-r--r-- | src/works/stories.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/works/stories.rs b/src/works/stories.rs index f86d24a..2623db6 100644 --- a/src/works/stories.rs +++ b/src/works/stories.rs @@ -24,10 +24,10 @@ struct Story { impl super::Works for Stories { // render single pages for every story with the extracted text and a download button fn render_single_pages( - &self, + self, tera_instance: &tera::Tera, template_name: &str, - ) -> Result<()> { + ) -> Result<Self> { let mut result = Vec::new(); for story in self.0.iter() { if story.update_available().with_context(|| format!("Failed to check for update for {}", story.title))? { @@ -40,7 +40,7 @@ impl super::Works for Stories { )); } } - Ok(()) + Ok(self) } // create stories from stories.json and add last modification date |
