From 0653ae2c9c37353cb2bae2511a63f04e06c30b98 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 25 Sep 2019 22:58:36 -0700 Subject: [PATCH] Fix compilation errors. --- wasmtime-wasi/src/syscalls.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wasmtime-wasi/src/syscalls.rs b/wasmtime-wasi/src/syscalls.rs index 7aa60d31e1..0ec69904b2 100644 --- a/wasmtime-wasi/src/syscalls.rs +++ b/wasmtime-wasi/src/syscalls.rs @@ -1,5 +1,5 @@ use cranelift_codegen::ir::types::{Type, I32, I64}; -use log::trace; +use log::{error, trace}; use wasi_common::{hostcalls, wasm32, WasiCtx}; use wasmtime_runtime::{Export, VMContext}; @@ -76,10 +76,10 @@ impl AbiRet for () { fn get_wasi_ctx(vmctx: &mut VMContext) -> Result<&mut WasiCtx, wasm32::__wasi_errno_t> { unsafe { - vmctx.host_state().downcast_mut::().ok_or_else(|| { - panic!("no host state named WasiCtx available"); - wasm32::__WASI_EINVAL - }) + vmctx + .host_state() + .downcast_mut::() + .ok_or_else(|| panic!("no host state named WasiCtx available")) } }