Merge branch 'bugfix/benchmark-failing' into feature/test-all-methods

This commit is contained in:
Jack Fletcher 2021-06-07 00:10:51 +01:00
commit 88df24c5e2

View file

@ -13,8 +13,11 @@ fn generate_random_archive(size: usize) -> Vec<u8> {
zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored); zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored);
writer.start_file("random.dat", options).unwrap(); writer.start_file("random.dat", options).unwrap();
// Generate some random data.
let mut bytes = vec![0u8; size]; 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.write_all(&bytes).unwrap();
writer.finish().unwrap().into_inner() writer.finish().unwrap().into_inner()