Fix new warnings

This commit is contained in:
2025-10-17 23:52:56 -04:00
parent 0a8da6bff0
commit c00fae79f8
5 changed files with 4 additions and 15 deletions
+2 -2
View File
@@ -50,11 +50,11 @@ impl MemoryClient {
}
fn aligned_memory(start: u32, length: usize) -> BoxBytes {
if start % 4 == 0 && length % 4 == 0 {
if start.is_multiple_of(4) && length.is_multiple_of(4) {
let memory = vec![0u32; length / 4].into_boxed_slice();
return bytemuck::box_bytes_of(memory);
}
if start % 2 == 0 && length % 2 == 0 {
if start.is_multiple_of(2) && length.is_multiple_of(2) {
let memory = vec![0u16; length / 2].into_boxed_slice();
return bytemuck::box_bytes_of(memory);
}