From f7be10edfc3719ea51170680e8ef3260bb941186 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sat, 5 Sep 2026 20:38:46 +0100 Subject: aggregate feeds into one --- src/retrieve.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/retrieve.rs') diff --git a/src/retrieve.rs b/src/retrieve.rs index ee904ab..3b89138 100644 --- a/src/retrieve.rs +++ b/src/retrieve.rs @@ -2,13 +2,12 @@ use futures::{StreamExt, stream}; use isahc::AsyncReadResponseExt; use rss::Channel; -pub async fn retrieve<'a, I>(urls: I) -> Vec +pub async fn retrieve<'a, I>(urls: I) -> impl StreamExt where I : IntoIterator { stream::iter(urls) .flat_map(|url| stream::once(retrieve_one_or_warn(url))) .filter_map(async |result| result.ok()) - .collect().await } async fn retrieve_one_or_warn(url: &str) -> anyhow::Result -- cgit v1.2.3