Skip to content

Commit 164cc6c

Browse files
Remove unnecessary block
This code must predate NLL?
1 parent 5bda2f0 commit 164cc6c

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/join.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,18 @@ pub(crate) fn join_into<'me, Key: Ord, Val1: Ord, Val2: Ord, Result: Ord>(
2020
let recent1 = input1.recent();
2121
let recent2 = input2.recent();
2222

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));
2524

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+
}
3528

36-
join_helper(&recent1, &recent2, &mut closure);
29+
for batch1 in input1.stable().iter() {
30+
join_helper(&batch1, &recent2, &mut closure);
3731
}
3832

33+
join_helper(&recent1, &recent2, &mut closure);
34+
3935
output.insert(Relation::from_vec(results));
4036
}
4137

0 commit comments

Comments
 (0)