From 88ea49564bf47edd224719f67e18b2e8d519b5e2 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Tue, 9 Jun 2020 15:50:54 +0200 Subject: [PATCH] fix(api) Restore the `unimplemented!` macro. --- lib/api/src/externals/function.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/api/src/externals/function.rs b/lib/api/src/externals/function.rs index 5a05ba216..ad0f4a001 100644 --- a/lib/api/src/externals/function.rs +++ b/lib/api/src/externals/function.rs @@ -252,12 +252,14 @@ impl Function { /// call the trampoline. pub fn call(&self, params: &[Val]) -> Result, RuntimeError> { let mut results = vec![Val::null(); self.result_arity()]; + match &self.definition { FunctionDefinition::Wasm(wasm) => { self.call_wasm(&wasm, params, &mut results)?; } - _ => {} // _ => unimplemented!("The host is unimplemented"), + _ => unimplemented!("The function definition isn't supported for the moment"), } + Ok(results.into_boxed_slice()) }