From 52fa6d94935cc348bb30e294972526c7268bcc4a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 18 Oct 2023 11:21:54 -0700 Subject: [PATCH] Fix tests --- src/commands/run.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/run.rs b/src/commands/run.rs index dba5cc889bdc..a7fc11f4f94d 100644 --- a/src/commands/run.rs +++ b/src/commands/run.rs @@ -427,8 +427,9 @@ impl RunCommand { .ok_or_else(|| anyhow!("no func export named `{}` found", name))? } else { instance - .get_func(&mut *store, "_start") - .ok_or_else(|| anyhow!("no `_start` function found"))? + .get_func(&mut *store, "") + .or_else(|| instance.get_func(&mut *store, "_start")) + .ok_or_else(|| anyhow!("no `_start` or `` function found"))? }; self.invoke_func(store, func)