chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791)
Successor to #27779 - in this PR I've applied changes manually, without futzing with if let lifetimes at all. Release Notes: - N/A
This commit is contained in:
parent
d51aa2ffb0
commit
0729d24d77
162 changed files with 2333 additions and 1937 deletions
|
@ -1038,7 +1038,7 @@ mod tests {
|
|||
let rng = &mut rng;
|
||||
let mut tree = SumTree::<u8>::default();
|
||||
let count = rng.gen_range(0..10);
|
||||
if rng.gen() {
|
||||
if rng.r#gen() {
|
||||
tree.extend(rng.sample_iter(distributions::Standard).take(count), &());
|
||||
} else {
|
||||
let items = rng
|
||||
|
@ -1064,7 +1064,7 @@ mod tests {
|
|||
tree = {
|
||||
let mut cursor = tree.cursor::<Count>(&());
|
||||
let mut new_tree = cursor.slice(&Count(splice_start), Bias::Right, &());
|
||||
if rng.gen() {
|
||||
if rng.r#gen() {
|
||||
new_tree.extend(new_items, &());
|
||||
} else {
|
||||
new_tree.par_extend(new_items, &());
|
||||
|
@ -1091,7 +1091,7 @@ mod tests {
|
|||
.filter(|(_, item)| (item & 1) == 0)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let mut item_ix = if rng.gen() {
|
||||
let mut item_ix = if rng.r#gen() {
|
||||
filter_cursor.next(&());
|
||||
0
|
||||
} else {
|
||||
|
@ -1172,8 +1172,8 @@ mod tests {
|
|||
for _ in 0..10 {
|
||||
let end = rng.gen_range(0..tree.extent::<Count>(&()).0 + 1);
|
||||
let start = rng.gen_range(0..end + 1);
|
||||
let start_bias = if rng.gen() { Bias::Left } else { Bias::Right };
|
||||
let end_bias = if rng.gen() { Bias::Left } else { Bias::Right };
|
||||
let start_bias = if rng.r#gen() { Bias::Left } else { Bias::Right };
|
||||
let end_bias = if rng.r#gen() { Bias::Left } else { Bias::Right };
|
||||
|
||||
let mut cursor = tree.cursor::<Count>(&());
|
||||
cursor.seek(&Count(start), start_bias, &());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue