diff --git a/plugin/rt/src/lib.rs b/plugin/rt/src/lib.rs index a8dd8c9b2b..ef7c25d0cd 100644 --- a/plugin/rt/src/lib.rs +++ b/plugin/rt/src/lib.rs @@ -41,9 +41,7 @@ static mut BUFFERS: Vec = Vec::new(); /// Allocate buffer from wasm linear memory #[no_mangle] -pub fn wasm_prepare_buffer(size: i32) -> i32 { - unsafe { - BUFFERS = Vec::::with_capacity(size as usize); - BUFFERS.as_ptr() as i32 - } +pub unsafe fn wasm_prepare_buffer(size: i32) -> i32 { + BUFFERS = Vec::::with_capacity(size as usize); + BUFFERS.as_ptr() as i32 }