From e9d48b7333bd2eb11ac50c2ad4bb0175bb788845 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Sun, 5 May 2024 19:39:13 -0700 Subject: [PATCH] style: Remove unnecessary "mut"s in merge_archive benchmarks --- benches/merge_archive.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/benches/merge_archive.rs b/benches/merge_archive.rs index 709cd8a5..ff07e1a6 100644 --- a/benches/merge_archive.rs +++ b/benches/merge_archive.rs @@ -59,7 +59,7 @@ fn merge_archive_stored(bench: &mut Bencher) { bench.iter(|| { let buf = Cursor::new(Vec::new()); let zip = ZipWriter::new(buf); - let mut zip = perform_merge(src.clone(), zip).unwrap(); + let zip = perform_merge(src.clone(), zip).unwrap(); let buf = zip.finish().unwrap().into_inner(); assert_eq!(buf.len(), len); }); @@ -75,7 +75,7 @@ fn merge_archive_compressed(bench: &mut Bencher) { bench.iter(|| { let buf = Cursor::new(Vec::new()); let zip = ZipWriter::new(buf); - let mut zip = perform_merge(src.clone(), zip).unwrap(); + let zip = perform_merge(src.clone(), zip).unwrap(); let buf = zip.finish().unwrap().into_inner(); assert_eq!(buf.len(), len); }); @@ -90,7 +90,7 @@ fn merge_archive_raw_copy_file_stored(bench: &mut Bencher) { bench.iter(|| { let buf = Cursor::new(Vec::new()); let zip = ZipWriter::new(buf); - let mut zip = perform_raw_copy_file(src.clone(), zip).unwrap(); + let zip = perform_raw_copy_file(src.clone(), zip).unwrap(); let buf = zip.finish().unwrap().into_inner(); assert_eq!(buf.len(), len); }); @@ -106,7 +106,7 @@ fn merge_archive_raw_copy_file_compressed(bench: &mut Bencher) { bench.iter(|| { let buf = Cursor::new(Vec::new()); let zip = ZipWriter::new(buf); - let mut zip = perform_raw_copy_file(src.clone(), zip).unwrap(); + let zip = perform_raw_copy_file(src.clone(), zip).unwrap(); let buf = zip.finish().unwrap().into_inner(); assert_eq!(buf.len(), len); });