mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
wasm_interp: remove unnecessary &mut from read_i32/read_u32
This commit is contained in:
parent
adc213b364
commit
0acf55137f
1 changed files with 2 additions and 2 deletions
|
@ -165,13 +165,13 @@ impl<'a> WasiDispatcher<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn read_u32(memory: &mut [u8], addr: usize) -> u32 {
|
||||
fn read_u32(memory: &[u8], addr: usize) -> u32 {
|
||||
let mut bytes = [0; 4];
|
||||
bytes.copy_from_slice(&memory[addr..][..4]);
|
||||
u32::from_le_bytes(bytes)
|
||||
}
|
||||
|
||||
fn read_i32(memory: &mut [u8], addr: usize) -> i32 {
|
||||
fn read_i32(memory: &[u8], addr: usize) -> i32 {
|
||||
let mut bytes = [0; 4];
|
||||
bytes.copy_from_slice(&memory[addr..][..4]);
|
||||
i32::from_le_bytes(bytes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue