diff --git a/hammond-data/src/opml.rs b/hammond-data/src/opml.rs index 9da756a..675d32b 100644 --- a/hammond-data/src/opml.rs +++ b/hammond-data/src/opml.rs @@ -25,12 +25,13 @@ pub struct Opml { } /// Import feed url's from a `R` into the `Source` table. -pub fn opml_import(reader: R) -> Result>, DataError> { - let feeds = extract_sources(reader)?; - Ok(feeds +pub fn opml_import(reader: R) -> Result>, reader::Error> { + let feeds = extract_sources(reader)? .iter() .map(|opml| Source::from_url(&opml.url)) - .collect()) + .collect(); + + Ok(feeds) } /// Extracts the `outline` elemnts from a reader `R` and returns a `HashSet` of `Opml` structs.