From 4a7c0d4e5c48eec2a5ef7505f4c319f76d5ef306 Mon Sep 17 00:00:00 2001 From: Jack Fletcher Date: Sun, 6 Jun 2021 22:33:46 +0100 Subject: [PATCH] Fix broken benchmark --- benches/read_entry.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benches/read_entry.rs b/benches/read_entry.rs index 25c0b94a..97417312 100644 --- a/benches/read_entry.rs +++ b/benches/read_entry.rs @@ -13,8 +13,11 @@ fn generate_random_archive(size: usize) -> Vec { zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored); writer.start_file("random.dat", options).unwrap(); + + // Generate some random data. let mut bytes = vec![0u8; size]; - rand::thread_rng().fill_bytes(&mut bytes); + rand::thread_rng().fill(bytes.as_mut_slice()); + writer.write_all(&bytes).unwrap(); writer.finish().unwrap().into_inner()