cargo fmt

This commit is contained in:
Jordan Petridis 2018-08-27 21:08:29 +03:00
parent a2d8b88337
commit aa1d0161d3
No known key found for this signature in database
GPG Key ID: E8523968931763BE
2 changed files with 17 additions and 15 deletions

View File

@ -87,7 +87,8 @@ fn filter_episodes<'a, S>(
where
S: Stream<Item = IndexState<NewEpisode>, Error = DataError> + Send + 'a,
{
stream.filter_map(|state| match state {
stream
.filter_map(|state| match state {
IndexState::NotChanged => None,
// Update individual rows, and filter them
IndexState::Update((ref ep, rowid)) => {
@ -97,7 +98,7 @@ where
.ok();
None
},
}
IndexState::Index(s) => Some(s),
})
// only Index is left, collect them for batch index

View File

@ -217,7 +217,8 @@ impl NewEpisodeMinimal {
let enc = item.enclosure();
// Get the url
let uri = enc.map(|s| url_cleaner(s.url().trim()))
let uri = enc
.map(|s| url_cleaner(s.url().trim()))
// Fallback to Rss.Item.link if enclosure is None.
.or_else(|| item.link().map(|s| url_cleaner(s.trim())));