From f9a5a200bb7ecc2cb17846c2608f69a904e40e2d Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sun, 2 Sep 2018 21:27:05 +0300 Subject: [PATCH] Feed: Remove unnecessary function wrapper --- podcasts-data/src/feed.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/podcasts-data/src/feed.rs b/podcasts-data/src/feed.rs index 55ade4b..2e4be57 100644 --- a/podcasts-data/src/feed.rs +++ b/podcasts-data/src/feed.rs @@ -26,7 +26,7 @@ pub struct Feed { impl Feed { /// Index the contents of the RSS `Feed` into the database. pub fn index(self) -> impl Future + Send { - self.parse_podcast_async() + ok(self.parse_podcast()) .and_then(|pd| pd.to_podcast()) .and_then(move |pd| self.index_channel_items(pd)) } @@ -35,10 +35,6 @@ impl Feed { NewShow::new(&self.channel, self.source_id) } - fn parse_podcast_async(&self) -> impl Future + Send { - ok(self.parse_podcast()) - } - fn index_channel_items(self, pd: Show) -> impl Future + Send { let stream = stream::iter_ok::<_, DataError>(self.channel.into_items());