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")) } }