Skip to content

Commit 364b534

Browse files
Chore: Refactor of code and docstrings formating.
1 parent 6cd15a8 commit 364b534

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/src/wasm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ mod runtime {
1515
static mut SRC: [u8; SZ] = [0; SZ];
1616
static mut OUT: [u8; SZ] = [0; SZ];
1717

18-
#[unsafe(no_mangle)] pub unsafe extern "C" fn src_ptr() -> *mut u8 { core::ptr::addr_of_mut!(SRC) as *mut u8 }
19-
#[unsafe(no_mangle)] pub unsafe extern "C" fn out_ptr() -> *const u8 { core::ptr::addr_of!(OUT) as *const u8 }
18+
#[unsafe(no_mangle)] pub unsafe extern "C" fn src_ptr() -> *mut u8 { core::ptr::addr_of_mut!(SRC) as *mut u8 }
19+
#[unsafe(no_mangle)] pub unsafe extern "C" fn out_ptr() -> *const u8 { core::ptr::addr_of!(OUT) as *const u8 }
2020

2121
#[unsafe(no_mangle)]
2222
pub unsafe extern "C" fn run(len: usize) -> usize {
2323
let len = len.min(SZ);
2424
let src = match core::str::from_utf8(core::slice::from_raw_parts(core::ptr::addr_of!(SRC) as *const u8, len)) {
25-
Ok(s) => s,
25+
Ok(s) => s,
2626
Err(e) => return write_out(&alloc::format!("input rejected: not valid utf-8 at byte {}", e.valid_up_to())),
2727
};
2828

0 commit comments

Comments
 (0)