From 3d3636059a7dbb06b20fa915d6f5fbf3e92774bb Mon Sep 17 00:00:00 2001 From: Syrus Date: Fri, 15 Nov 2019 14:04:48 -0800 Subject: [PATCH] Revert "Improved wasmer invoke based on feedback" This reverts commit f3b7c6b321b06dad25d9892b0c3c4b302843a6b0. --- src/bin/wasmer.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 48f43c917..7af5df3e2 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -687,7 +687,10 @@ fn execute_wasm(options: &Run) -> Result<(), String> { args.push(Value::I32(x)); } - let invoke_fn = options.invoke.clone().unwrap_or("main".to_owned()); + let invoke_fn = match options.invoke.as_ref() { + Some(fun) => fun, + _ => "main", + }; instance .dyn_func(&invoke_fn) .map_err(|e| format!("{:?}", e))?