1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-09-14 09:10:16 +02:00

flashrom_tester: Fix cargo check and clippy warnings

Change-Id: I50c5af61e06df1bb6956f347cb6806a7eca6ce0e
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67472
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Evan Benn
2022-09-09 15:35:28 +10:00
committed by Angel Pons
parent 813c68ad9c
commit 1f65e9029b
8 changed files with 33 additions and 45 deletions

View File

@@ -42,9 +42,7 @@ use rand::prelude::*;
pub fn gen_rand_testdata(path: &str, size: usize) -> std::io::Result<()> {
let mut buf = BufWriter::new(File::create(path)?);
let mut a: Vec<u8> = Vec::with_capacity(size);
// Pad out array to be filled in by Rng::fill().
a.resize(size, 0b0);
let mut a: Vec<u8> = vec![0; size];
thread_rng().fill(a.as_mut_slice());
buf.write_all(a.as_slice())?;