mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Use std and core over libc where equivalent
This commit is contained in:
parent
bb49593c2e
commit
0bc3ff4ca5
6 changed files with 7 additions and 6 deletions
|
@ -434,8 +434,8 @@ fn wasm_roc_panic(address: u32, tag_id: u32) {
|
|||
let width = 100;
|
||||
let c_ptr = (ptr.deref(memory, 0, width)).unwrap();
|
||||
|
||||
use libc::c_char;
|
||||
use std::ffi::CStr;
|
||||
use std::os::raw::c_char;
|
||||
let slice = unsafe { CStr::from_ptr(c_ptr as *const _ as *const c_char) };
|
||||
string = slice.to_str().unwrap();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue