diff options
| author | mat <git@matdoes.dev> | 2023-08-25 02:34:31 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-08-25 02:34:31 -0500 |
| commit | d5465cd28e43d48b3e913fdb1161eb907e4d80d0 (patch) | |
| tree | b0962ac1bd09b434c67296c038ef3b26245ce6d7 /azalea-crypto | |
| parent | 9c31f8033f006d5f505ce97e359638d6c1136859 (diff) | |
| download | azalea-drasl-d5465cd28e43d48b3e913fdb1161eb907e4d80d0.tar.xz | |
add basic pathfinding test
Diffstat (limited to 'azalea-crypto')
| -rwxr-xr-x | azalea-crypto/benches/my_benchmark.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-crypto/benches/my_benchmark.rs b/azalea-crypto/benches/my_benchmark.rs index e8c4ecad..1781f471 100755 --- a/azalea-crypto/benches/my_benchmark.rs +++ b/azalea-crypto/benches/my_benchmark.rs @@ -5,8 +5,8 @@ fn bench(c: &mut Criterion) { let (mut enc, dec) = create_cipher(b"0123456789abcdef"); let mut packet = [0u8; 65536]; - for i in 0..packet.len() { - packet[i] = i as u8; + for (i, item) in packet.iter_mut().enumerate() { + *item = i as u8; } c.bench_function("Encrypt 64kb", |b| { |
