Use std and core over libc where equivalent

This commit is contained in:
Richard Feldman 2021-11-02 16:33:37 -04:00
parent bb49593c2e
commit 0bc3ff4ca5
6 changed files with 7 additions and 6 deletions

View file

@ -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();
});