mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-02 13:52:13 +00:00
cargo fmt and better error message
This commit is contained in:
parent
ad3d361f76
commit
0f9369c67d
@ -46,10 +46,10 @@ use std::slice;
|
|||||||
// Another conditional constant for name resolution: Macos et iOS use
|
// Another conditional constant for name resolution: Macos et iOS use
|
||||||
// SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket.
|
// SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket.
|
||||||
// Other platforms do otherwise.
|
// Other platforms do otherwise.
|
||||||
|
use crate::env::get_emscripten_data;
|
||||||
|
use crate::utils::copy_cstr_into_wasm;
|
||||||
#[cfg(target_os = "darwin")]
|
#[cfg(target_os = "darwin")]
|
||||||
use libc::SO_NOSIGPIPE;
|
use libc::SO_NOSIGPIPE;
|
||||||
use crate::utils::copy_cstr_into_wasm;
|
|
||||||
use crate::env::get_emscripten_data;
|
|
||||||
use std::ffi::CString;
|
use std::ffi::CString;
|
||||||
|
|
||||||
#[cfg(not(target_os = "darwin"))]
|
#[cfg(not(target_os = "darwin"))]
|
||||||
@ -203,9 +203,7 @@ pub fn ___syscall183(ctx: &mut Ctx, buf: u32, _size: u32) -> u32 {
|
|||||||
let offset = unsafe { copy_cstr_into_wasm(ctx, path_c_string.as_ptr()) };
|
let offset = unsafe { copy_cstr_into_wasm(ctx, path_c_string.as_ptr()) };
|
||||||
offset
|
offset
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => panic!("Failed to read current directory from environment."),
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ mod test_funcptrfunc;
|
|||||||
mod test_funcs;
|
mod test_funcs;
|
||||||
mod test_functionpointer_libfunc_varargs;
|
mod test_functionpointer_libfunc_varargs;
|
||||||
mod test_fwrite_0;
|
mod test_fwrite_0;
|
||||||
|
mod test_getcwd;
|
||||||
mod test_getgep;
|
mod test_getgep;
|
||||||
mod test_getloadavg;
|
mod test_getloadavg;
|
||||||
mod test_getopt;
|
mod test_getopt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user