cargo fmt
This commit is contained in:
parent
a2d8b88337
commit
aa1d0161d3
@ -87,7 +87,8 @@ fn filter_episodes<'a, S>(
|
|||||||
where
|
where
|
||||||
S: Stream<Item = IndexState<NewEpisode>, Error = DataError> + Send + 'a,
|
S: Stream<Item = IndexState<NewEpisode>, Error = DataError> + Send + 'a,
|
||||||
{
|
{
|
||||||
stream.filter_map(|state| match state {
|
stream
|
||||||
|
.filter_map(|state| match state {
|
||||||
IndexState::NotChanged => None,
|
IndexState::NotChanged => None,
|
||||||
// Update individual rows, and filter them
|
// Update individual rows, and filter them
|
||||||
IndexState::Update((ref ep, rowid)) => {
|
IndexState::Update((ref ep, rowid)) => {
|
||||||
@ -97,7 +98,7 @@ where
|
|||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
None
|
None
|
||||||
},
|
}
|
||||||
IndexState::Index(s) => Some(s),
|
IndexState::Index(s) => Some(s),
|
||||||
})
|
})
|
||||||
// only Index is left, collect them for batch index
|
// only Index is left, collect them for batch index
|
||||||
|
|||||||
@ -217,7 +217,8 @@ impl NewEpisodeMinimal {
|
|||||||
let enc = item.enclosure();
|
let enc = item.enclosure();
|
||||||
|
|
||||||
// Get the url
|
// 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.
|
// Fallback to Rss.Item.link if enclosure is None.
|
||||||
.or_else(|| item.link().map(|s| url_cleaner(s.trim())));
|
.or_else(|| item.link().map(|s| url_cleaner(s.trim())));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user