Miscellaneous clippy fixes.

This commit is contained in:
Dan Gohman
2019-08-14 14:46:15 -07:00
committed by Jakub Konka
parent 39161d020f
commit 52b69c21cf
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ use log::trace;
use wasi_common_cbindgen::wasi_common_cbindgen;
#[wasi_common_cbindgen]
pub fn proc_exit(rval: wasm32::__wasi_exitcode_t) -> () {
pub fn proc_exit(rval: wasm32::__wasi_exitcode_t) {
trace!("proc_exit(rval={:?})", rval);
// TODO: Rather than call std::process::exit here, we should trigger a
// stack unwind similar to a trap.

View File

@@ -63,7 +63,7 @@ pub(crate) fn clock_time_get(clock_id: host::__wasi_clockid_t) -> Result<host::_
(timespec.tv_sec as host::__wasi_timestamp_t)
.checked_mul(1_000_000_000)
.and_then(|sec_ns| sec_ns.checked_add(timespec.tv_nsec as host::__wasi_timestamp_t))
.map_or(Err(Error::EOVERFLOW), |time| Ok(time))
.map_or(Err(Error::EOVERFLOW), Ok)
}
pub(crate) fn poll_oneoff(