@@ -649,7 +649,9 @@ impl<I, T> CoalesceCore<I, T>
649
649
///
650
650
/// See [`.coalesce()`](../trait.Itertools.html#method.coalesce) for more information.
651
651
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
652
- pub struct Coalesce < I , F >
652
+ pub type Coalesce < I , F > = CoalesceBy < I , F > ;
653
+
654
+ pub struct CoalesceBy < I , F >
653
655
where I : Iterator
654
656
{
655
657
iter : CoalesceCore < I , I :: Item > ,
@@ -668,18 +670,18 @@ impl<F, Item, T> CoalescePredicate<Item, T> for F
668
670
}
669
671
}
670
672
671
- impl < I : Clone , F : Clone > Clone for Coalesce < I , F >
673
+ impl < I : Clone , F : Clone > Clone for CoalesceBy < I , F >
672
674
where I : Iterator ,
673
675
I :: Item : Clone
674
676
{
675
677
clone_fields ! ( iter, f) ;
676
678
}
677
679
678
- impl < I , F > fmt:: Debug for Coalesce < I , F >
680
+ impl < I , F > fmt:: Debug for CoalesceBy < I , F >
679
681
where I : Iterator + fmt:: Debug ,
680
682
I :: Item : fmt:: Debug ,
681
683
{
682
- debug_fmt_fields ! ( Coalesce , iter) ;
684
+ debug_fmt_fields ! ( CoalesceBy , iter) ;
683
685
}
684
686
685
687
/// Create a new `Coalesce`.
@@ -695,7 +697,7 @@ pub fn coalesce<I, F>(mut iter: I, f: F) -> Coalesce<I, F>
695
697
}
696
698
}
697
699
698
- impl < I , F > Iterator for Coalesce < I , F >
700
+ impl < I , F > Iterator for CoalesceBy < I , F >
699
701
where I : Iterator ,
700
702
F : CoalescePredicate < I :: Item , I :: Item >
701
703
{
0 commit comments