Skip to content

Commit

Permalink
Implement FusedIterator on CoalesceBy
Browse files Browse the repository at this point in the history
  • Loading branch information
phimuemue committed May 24, 2020
1 parent a23daea commit 908a781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adaptors/mod.rs
Expand Up @@ -703,6 +703,8 @@ impl<I, F, T> Iterator for CoalesceBy<I, F, T>
}
}

impl<I: Iterator, F: CoalescePredicate<I::Item, T>, T> FusedIterator for CoalesceBy<I, F, T> {}

/// An iterator adaptor that removes repeated duplicates, determining equality using a comparison function.
///
/// See [`.dedup_by()`](../trait.Itertools.html#method.dedup_by) or [`.dedup()`](../trait.Itertools.html#method.dedup) for more information.
Expand Down Expand Up @@ -813,8 +815,6 @@ pub fn dedup_with_count<I>(iter: I) -> DedupWithCount<I>
dedup_by_with_count(iter, DedupEq)
}

impl<I: Iterator, Pred: DedupPredicate<I::Item>> FusedIterator for DedupByWithCount<I, Pred> {}

/// An iterator adaptor that borrows from a `Clone`-able iterator
/// to only pick off elements while the predicate returns `true`.
///
Expand Down

0 comments on commit 908a781

Please sign in to comment.