@@ -607,18 +607,18 @@ impl<I, J, F> Iterator for MergeBy<I, J, F>
607
607
}
608
608
609
609
#[ derive( Clone , Debug ) ]
610
- pub struct CoalesceCore < I >
610
+ pub struct CoalesceCore < I , T >
611
611
where I : Iterator
612
612
{
613
613
iter : I ,
614
- last : Option < I :: Item > ,
614
+ last : Option < T > ,
615
615
}
616
616
617
- impl < I > CoalesceCore < I >
617
+ impl < I , T > CoalesceCore < I , T >
618
618
where I : Iterator
619
619
{
620
- fn next_with < F > ( & mut self , mut f : F ) -> Option < I :: Item >
621
- where F : FnMut ( I :: Item , I :: Item ) -> Result < I :: Item , ( I :: Item , I :: Item ) >
620
+ fn next_with < F > ( & mut self , mut f : F ) -> Option < T >
621
+ where F : FnMut ( T , I :: Item ) -> Result < T , ( T , T ) >
622
622
{
623
623
// this fuses the iterator
624
624
let mut last = match self . last . take ( ) {
@@ -652,7 +652,7 @@ impl<I> CoalesceCore<I>
652
652
pub struct Coalesce < I , F >
653
653
where I : Iterator
654
654
{
655
- iter : CoalesceCore < I > ,
655
+ iter : CoalesceCore < I , I :: Item > ,
656
656
f : F ,
657
657
}
658
658
@@ -705,7 +705,7 @@ impl<I, F> Iterator for Coalesce<I, F>
705
705
pub struct DedupBy < I , Pred >
706
706
where I : Iterator
707
707
{
708
- iter : CoalesceCore < I > ,
708
+ iter : CoalesceCore < I , I :: Item > ,
709
709
dedup_pred : Pred ,
710
710
}
711
711
0 commit comments