From d5465cd28e43d48b3e913fdb1161eb907e4d80d0 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 25 Aug 2023 02:34:31 -0500 Subject: add basic pathfinding test --- azalea-crypto/benches/my_benchmark.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-crypto') 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| { -- cgit v1.2.3