feat(deprecated) #45 has been closed, move code here.

This commit is contained in:
Ivan Enderlin
2020-06-04 11:38:48 +02:00
parent 1bfa447f97
commit a3e1c63ebb

View File

@@ -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(())
}