Skip to content

Commit 05389cf

Browse files
chore: fix clippy warnings
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent c1e65ca commit 05389cf

4 files changed

Lines changed: 15 additions & 16 deletions

File tree

‎Cargo.lock‎

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/cli/src/testsuite.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl TestSuite {
107107
return Ok(());
108108
}
109109

110-
let mut file = OpenOptions::new().create(true).read(true).write(true).open(path)?;
110+
let mut file = OpenOptions::new().create(true).truncate(false).read(true).write(true).open(path)?;
111111
let last_line = BufReader::new(&file).lines().last().transpose()?;
112112

113113
if let Some(last) = last_line

‎crates/types/src/archive.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ mod tests {
9090
#[test]
9191
fn v128_operands_round_trip_archive() {
9292
let bytes = [0x00, 0x01, 0x02, 0x03, 0x7f, 0x80, 0xfe, 0xff, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x90];
93-
let mut function = WasmFunction::default();
94-
function.max_stack = ValueCounts { c32: 2, c64: 3, c128: 4 };
93+
let mut function = WasmFunction { max_stack: ValueCounts { c32: 2, c64: 3, c128: 4 }, ..Default::default() };
9594
let constant = Operand128Idx::new(0);
9695
function.data.operands128 = Box::new([Operand128::<[u8; 16]>::new(bytes).cast()]);
9796
function.instructions = Box::new([Instruction::Const128(constant), Instruction::I8x16Shuffle(constant)]);

‎examples/doom/src/runtime.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl Runtime {
5757
.and_then(|data| data.get(..SCREEN_WIDTH * SCREEN_HEIGHT * 4))
5858
.context("framebuffer is outside guest memory")?;
5959
anyhow::ensure!(dst.len() <= SCREEN_WIDTH * SCREEN_HEIGHT, "framebuffer destination is too large");
60-
for (pixel, chunk) in dst.iter_mut().zip(framebuffer.chunks_exact(4)) {
60+
for (pixel, chunk) in dst.iter_mut().zip(framebuffer.as_chunks::<4>().0) {
6161
*pixel = ((chunk[0] as u32) << 16) | ((chunk[1] as u32) << 8) | chunk[2] as u32;
6262
}
6363
Ok(())

0 commit comments

Comments
 (0)