Skip to content

Commit

Permalink
Revert "Improved wasmer invoke based on feedback"
Browse files Browse the repository at this point in the history
This reverts commit f3b7c6b.
  • Loading branch information
syrusakbary committed Nov 15, 2019
1 parent f3b7c6b commit 3d36360
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bin/wasmer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))?
Expand Down

0 comments on commit 3d36360

Please sign in to comment.