diff --git a/compiler/gen_wasm/src/backend.rs b/compiler/gen_wasm/src/backend.rs index 8dde040391..72f45ae5d9 100644 --- a/compiler/gen_wasm/src/backend.rs +++ b/compiler/gen_wasm/src/backend.rs @@ -665,7 +665,8 @@ impl<'a> WasmBackend<'a> { bytes[11] = 0x80 | (len as u8); // Transform into two integers, to minimise number of instructions - let bytes_split: &([u8; 8], [u8; 4]) = unsafe { std::mem::transmute(&bytes) }; + let bytes_split: &([u8; 8], [u8; 4]) = + unsafe { std::mem::transmute(&bytes) }; let int64 = i64::from_le_bytes(bytes_split.0); let int32 = i32::from_le_bytes(bytes_split.1); diff --git a/compiler/test_gen/src/wasm_str.rs b/compiler/test_gen/src/wasm_str.rs index 87020c7bd5..da5125181d 100644 --- a/compiler/test_gen/src/wasm_str.rs +++ b/compiler/test_gen/src/wasm_str.rs @@ -311,7 +311,20 @@ fn small_str_zeroed_literal() { functionWithReusedSpace True "# ), - [0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0b1000_0001], + [ + 0x4a, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0b1000_0001 + ], [u8; 12] ); }