diff options
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| { |
