From 30b707d610f4daf025da01b12247bd3b7ebd9e55 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Sat, 3 Jun 2023 14:33:09 +0200 Subject: Clean command pattern for works --- src/works/stories.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/works/stories.rs') 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 { 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 -- cgit v1.2.3