Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions wasmtime-runtime/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,11 @@ impl Instance {
// As a compatibility measure, if the module doesn't have a start
// function but does have a _start function exported, call that.
match start_export {
wasmtime_environ::Export::Function(func_index) => {
let sig = &self.module.signatures[self.module.functions[*func_index]];
&wasmtime_environ::Export::Function(func_index) => {
let sig = &self.module.signatures[self.module.functions[func_index]];
// No wasm params or returns; just the vmctx param.
if sig.params.len() == 1 && sig.returns.is_empty() {
self.invoke_function(*func_index)
self.invoke_function(func_index)
} else {
Ok(())
}
Expand All @@ -482,11 +482,11 @@ impl Instance {
// start function or a _start function exported, but does have a main
// function exported, call that.
match main_export {
wasmtime_environ::Export::Function(func_index) => {
let sig = &self.module.signatures[self.module.functions[*func_index]];
&wasmtime_environ::Export::Function(func_index) => {
let sig = &self.module.signatures[self.module.functions[func_index]];
// No wasm params or returns; just the vmctx param.
if sig.params.len() == 1 && sig.returns.is_empty() {
self.invoke_function(*func_index)
self.invoke_function(func_index)
} else {
Ok(())
}
Expand Down