diff --git a/lib/api/src/sys/externals/memory.rs b/lib/api/src/sys/externals/memory.rs index 0f880b07faa..b5b6ba5cc7e 100644 --- a/lib/api/src/sys/externals/memory.rs +++ b/lib/api/src/sys/externals/memory.rs @@ -226,11 +226,6 @@ impl Memory { unsafe { MemoryView::new(base as _, length as u32) } } - /// A uint8view - pub fn uint8view(&self) -> MemoryView { - self.view() - } - pub(crate) fn from_vm_export(store: &Store, vm_memory: VMMemory) -> Self { Self { store: store.clone(), diff --git a/lib/wasi/src/syscalls/mod.rs b/lib/wasi/src/syscalls/mod.rs index b9537099ab1..958428d5e63 100644 --- a/lib/wasi/src/syscalls/mod.rs +++ b/lib/wasi/src/syscalls/mod.rs @@ -96,7 +96,7 @@ fn read_bytes( bytes_read += reader.read(&mut raw_bytes).map_err(|_| __WASI_EIO)? as u32; unsafe { memory - .uint8view() + .view::() .subarray( iov_inner.buf as u32, iov_inner.buf as u32 + iov_inner.buf_len as u32, @@ -2530,7 +2530,7 @@ pub fn random_get(env: &WasiEnv, buf: u32, buf_len: u32) -> __wasi_errno_t { Ok(()) => { unsafe { memory - .uint8view() + .view::() .subarray(buf as u32, (buf as u32 + buf_len as u32)) .copy_from(&u8_buffer); }