cargo fmt

This commit is contained in:
Mackenzie Clark 2019-02-22 15:16:07 -08:00
parent 70e0b8cee1
commit 7fb7529b48

View File

@ -199,7 +199,8 @@ pub fn ___syscall183(ctx: &mut Ctx, buf_offset: u32, _size: u32) -> u32 {
let path_string = path.unwrap().display().to_string();
let len = path_string.len();
unsafe {
let pointer_to_buffer = emscripten_memory_pointer!(ctx.memory(0), buf_offset) as *mut libc::c_char;
let pointer_to_buffer =
emscripten_memory_pointer!(ctx.memory(0), buf_offset) as *mut libc::c_char;
let slice = slice::from_raw_parts_mut(pointer_to_buffer, len.clone());
for (byte, loc) in path_string.bytes().zip(slice.iter_mut()) {
*loc = byte as _;