mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2025-03-15 04:30:50 +00:00
add use
This commit is contained in:
parent
c53f03ad06
commit
c1ecd7e284
@ -159,7 +159,10 @@ pub fn log_utf8_string(ptr: i32, size: i32) {
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn log_utf8_string(ptr: i32, size: i32) {
|
||||
let msg = unsafe { from_utf8_unchecked(core::slice::from_raw_parts(ptr as _, size as _)) };
|
||||
use std::str::from_utf8_unchecked;
|
||||
use core::slice::from_raw_parts;
|
||||
|
||||
let msg = unsafe { from_utf8_unchecked(from_raw_parts(ptr as _, size as _)) };
|
||||
println!("{}", msg);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user