@@ -90,8 +90,8 @@ impl<I, J, F> Iterator for MergeJoinBy<I, J, F>
90
90
loop {
91
91
match ( self . left . next ( ) , self . right . next ( ) ) {
92
92
( None , None ) => break count,
93
- ( Some ( _left) , None ) => break count + 1 + self . left . count ( ) ,
94
- ( None , Some ( _right) ) => break count + 1 + self . right . count ( ) ,
93
+ ( Some ( _left) , None ) => break count + 1 + self . left . into_parts ( ) . 1 . count ( ) ,
94
+ ( None , Some ( _right) ) => break count + 1 + self . right . into_parts ( ) . 1 . count ( ) ,
95
95
( Some ( left) , Some ( right) ) => {
96
96
count += 1 ;
97
97
match ( self . cmp_fn ) ( & left, & right) {
@@ -110,10 +110,14 @@ impl<I, J, F> Iterator for MergeJoinBy<I, J, F>
110
110
match ( self . left . next ( ) , self . right . next ( ) ) {
111
111
( None , None ) => break previous_element,
112
112
( Some ( left) , None ) => {
113
- break Some ( EitherOrBoth :: Left ( self . left . last ( ) . unwrap_or ( left) ) )
113
+ break Some ( EitherOrBoth :: Left (
114
+ self . left . into_parts ( ) . 1 . last ( ) . unwrap_or ( left) ,
115
+ ) )
114
116
}
115
117
( None , Some ( right) ) => {
116
- break Some ( EitherOrBoth :: Right ( self . right . last ( ) . unwrap_or ( right) ) )
118
+ break Some ( EitherOrBoth :: Right (
119
+ self . right . into_parts ( ) . 1 . last ( ) . unwrap_or ( right) ,
120
+ ) )
117
121
}
118
122
( Some ( left) , Some ( right) ) => {
119
123
previous_element = match ( self . cmp_fn ) ( & left, & right) {
0 commit comments