diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-22 17:42:04 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-22 17:42:47 -0500 |
| commit | a06baa56b95674fc626b3c3fd680d6a65357fe60 (patch) | |
| tree | cd9d867c2ca3cff5c1d6b3bd73377c44649fb075 /src/libstd/sys/wasi/mod.rs | |
| parent | 8eb7c58dbb7b32701af113bc58722d0d1fefb1eb (diff) | |
| download | rust-a06baa56b95674fc626b3c3fd680d6a65357fe60.tar.gz rust-a06baa56b95674fc626b3c3fd680d6a65357fe60.zip | |
Format the world
Diffstat (limited to 'src/libstd/sys/wasi/mod.rs')
| -rw-r--r-- | src/libstd/sys/wasi/mod.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/libstd/sys/wasi/mod.rs b/src/libstd/sys/wasi/mod.rs index 83f98a19f47..241d499ca3b 100644 --- a/src/libstd/sys/wasi/mod.rs +++ b/src/libstd/sys/wasi/mod.rs @@ -27,14 +27,17 @@ pub mod condvar; pub mod env; pub mod fd; pub mod fs; +pub mod io; #[path = "../wasm/memchr.rs"] pub mod memchr; #[path = "../wasm/mutex.rs"] pub mod mutex; pub mod net; -pub mod io; pub mod os; pub use crate::sys_common::os_str_bytes as os_str; +pub mod ext; +#[path = "../wasm/fast_thread_local.rs"] +pub mod fast_thread_local; pub mod path; pub mod pipe; pub mod process; @@ -46,24 +49,17 @@ pub mod stdio; pub mod thread; #[path = "../wasm/thread_local.rs"] pub mod thread_local; -#[path = "../wasm/fast_thread_local.rs"] -pub mod fast_thread_local; pub mod time; -pub mod ext; #[cfg(not(test))] -pub fn init() { -} +pub fn init() {} pub fn unsupported<T>() -> std_io::Result<T> { Err(unsupported_err()) } pub fn unsupported_err() -> std_io::Error { - std_io::Error::new( - std_io::ErrorKind::Other, - "operation not supported on wasm yet", - ) + std_io::Error::new(std_io::ErrorKind::Other, "operation not supported on wasm yet") } pub fn decode_error_kind(errno: i32) -> std_io::ErrorKind { @@ -101,7 +97,7 @@ pub unsafe fn strlen(mut s: *const c_char) -> usize { n += 1; s = s.offset(1); } - return n + return n; } pub unsafe fn abort_internal() -> ! { @@ -115,7 +111,7 @@ pub fn hashmap_random_keys() -> (u64, u64) { let len = mem::size_of_val(&ret); wasi::random_get(base, len).expect("random_get failure"); } - return ret + return ret; } fn err2io(err: wasi::Error) -> std_io::Error { |
