mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Fix build warning unnecessary unsafe
This commit is contained in:
parent
2c2d21044f
commit
e583226510
@ -20,10 +20,8 @@ pub fn is_emscripten_module(module: &Module) -> bool {
|
||||
pub unsafe fn write_to_buf(string: *const c_char, buf: u32, max: u32, instance: &Instance) -> u32 {
|
||||
let buf_addr = instance.memory_offset_addr(0, buf as _) as *mut c_char;
|
||||
|
||||
unsafe {
|
||||
for i in 0..max {
|
||||
*buf_addr.add(i as _) = *string.add(i as _);
|
||||
}
|
||||
for i in 0..max {
|
||||
*buf_addr.add(i as _) = *string.add(i as _);
|
||||
}
|
||||
|
||||
buf
|
||||
|
Loading…
Reference in New Issue
Block a user