@@ -9,18 +9,19 @@ fn same_range_first_consumers_return_correct_answer() {
9
9
10
10
// We save a consumer that will be far to the right of the main consumer (and therefore not
11
11
// sharing an index range with that consumer) for fullness testing
12
- let consumer = far_right_consumer. split_off ( ) ;
12
+ let consumer = far_right_consumer. split_off_left ( ) ;
13
13
14
14
// split until we have an indivisible range
15
15
let bits_in_usize = usize:: min_value ( ) . count_zeros ( ) ;
16
+
16
17
for _ in 0 ..bits_in_usize {
17
- consumer. split_off ( ) ;
18
+ consumer. split_off_left ( ) ;
18
19
}
19
20
20
21
let reducer = consumer. to_reducer ( ) ;
21
22
// the left and right folders should now have the same range, having
22
23
// exhausted the resolution of usize
23
- let left_folder = consumer. split_off ( ) . into_folder ( ) ;
24
+ let left_folder = consumer. split_off_left ( ) . into_folder ( ) ;
24
25
let right_folder = consumer. into_folder ( ) ;
25
26
26
27
let left_folder = left_folder. consume ( 0 ) . consume ( 1 ) ;
@@ -42,20 +43,20 @@ fn same_range_last_consumers_return_correct_answer() {
42
43
43
44
// We save a consumer that will be far to the left of the main consumer (and therefore not
44
45
// sharing an index range with that consumer) for fullness testing
45
- let far_left_consumer = consumer. split_off ( ) ;
46
+ let far_left_consumer = consumer. split_off_left ( ) ;
46
47
47
48
// split until we have an indivisible range
48
49
let bits_in_usize = usize:: min_value ( ) . count_zeros ( ) ;
49
50
for _ in 0 ..bits_in_usize {
50
- consumer. split_off ( ) ;
51
+ consumer. split_off_left ( ) ;
51
52
}
52
53
53
54
let reducer = consumer. to_reducer ( ) ;
54
- // due to the exact calculation in split_off , the very last consumer has a
55
+ // due to the exact calculation in split_off_left , the very last consumer has a
55
56
// range of width 2, so we use the second-to-last consumer instead to get
56
57
// the same boundary on both folders
57
- let consumer = consumer. split_off ( ) ;
58
- let left_folder = consumer. split_off ( ) . into_folder ( ) ;
58
+ let consumer = consumer. split_off_left ( ) ;
59
+ let left_folder = consumer. split_off_left ( ) . into_folder ( ) ;
59
60
let right_folder = consumer. into_folder ( ) ;
60
61
let right_folder = right_folder. consume ( 2 ) . consume ( 3 ) ;
61
62
assert_eq ! ( left_folder. boundary, right_folder. boundary) ;
0 commit comments