mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-10 22:58:18 +00:00
feat(deprecated) #45 has been closed, move code here.
This commit is contained in:
@@ -31,7 +31,15 @@ impl Instance {
|
||||
self.new_instance
|
||||
.module()
|
||||
.info()
|
||||
.resolve_func(name)
|
||||
.func_names
|
||||
.iter()
|
||||
.find_map(|(function_index, function_name)| {
|
||||
if function_name.as_str() == name {
|
||||
Some(function_index)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.map(|function_index| function_index.index())
|
||||
.ok_or(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user