Verified Commit 8a05597e authored by Jordan Petridis's avatar Jordan Petridis 🌱

Feed: Remove another unnecessary wrapper

parent 145d45f8
......@@ -40,7 +40,8 @@ impl Feed {
// Parse the episodes
let episodes = stream.filter_map(move |item| {
glue(&item, pd.id())
NewEpisodeMinimal::new(&item, pd.id())
.and_then(move |ep| determine_ep_state(ep, &item))
.map_err(|err| error!("Failed to parse an episode: {}", err))
.ok()
});
......@@ -52,10 +53,6 @@ impl Feed {
}
}
fn glue(item: &rss::Item, id: i32) -> Result<IndexState<NewEpisode>, DataError> {
NewEpisodeMinimal::new(item, id).and_then(move |ep| determine_ep_state(ep, item))
}
fn determine_ep_state(
ep: NewEpisodeMinimal,
item: &rss::Item,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment