Update Rust Edition to 2024 (#7766)

* #7749

Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
chonghe
2025-08-13 11:04:31 +08:00
committed by GitHub
parent bd6b8b6a65
commit 522bd9e9c6
468 changed files with 3594 additions and 3396 deletions

View File

@@ -1,4 +1,4 @@
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
use criterion::{BenchmarkId, Criterion, black_box, criterion_group, criterion_main};
use swap_or_not_shuffle::{compute_shuffled_index, shuffle_list as fast_shuffle};
const SHUFFLE_ROUND_COUNT: u8 = 90;

View File

@@ -46,11 +46,7 @@ fn do_round(seed: &[u8], index: usize, pivot: usize, round: u8, list_size: usize
let source = hash_with_round_and_position(seed, round, position);
let byte = source[(position % 256) / 8];
let bit = (byte >> (position % 8)) % 2;
if bit == 1 {
flip
} else {
index
}
if bit == 1 { flip } else { index }
}
fn hash_with_round_and_position(seed: &[u8], round: u8, position: usize) -> Hash256 {