@@ -20,22 +20,18 @@ pub(crate) fn join_into<'me, Key: Ord, Val1: Ord, Val2: Ord, Result: Ord>(
20
20
let recent1 = input1. recent ( ) ;
21
21
let recent2 = input2. recent ( ) ;
22
22
23
- {
24
- // scoped to let `closure` drop borrow of `results`.
23
+ let mut closure = |k : & Key , v1 : & Val1 , v2 : & Val2 | results. push ( logic ( k, v1, v2) ) ;
25
24
26
- let mut closure = |k : & Key , v1 : & Val1 , v2 : & Val2 | results. push ( logic ( k, v1, v2) ) ;
27
-
28
- for batch2 in input2. stable ( ) . iter ( ) {
29
- join_helper ( & recent1, & batch2, & mut closure) ;
30
- }
31
-
32
- for batch1 in input1. stable ( ) . iter ( ) {
33
- join_helper ( & batch1, & recent2, & mut closure) ;
34
- }
25
+ for batch2 in input2. stable ( ) . iter ( ) {
26
+ join_helper ( & recent1, & batch2, & mut closure) ;
27
+ }
35
28
36
- join_helper ( & recent1, & recent2, & mut closure) ;
29
+ for batch1 in input1. stable ( ) . iter ( ) {
30
+ join_helper ( & batch1, & recent2, & mut closure) ;
37
31
}
38
32
33
+ join_helper ( & recent1, & recent2, & mut closure) ;
34
+
39
35
output. insert ( Relation :: from_vec ( results) ) ;
40
36
}
41
37
0 commit comments