mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 20:58:28 +00:00
Implement further for compiler-cranelift; add ExternRef
This commit is contained in:
4
lib/api/src/externals/table.rs
vendored
4
lib/api/src/externals/table.rs
vendored
@@ -69,7 +69,9 @@ impl Table {
|
||||
|
||||
/// Retrieves an element of the table at the provided `index`.
|
||||
pub fn get(&self, index: u32) -> Option<Val> {
|
||||
let item = self.table.get(index)?;
|
||||
// TODO: review change to make inner table return a trap in Result, maybe we don't
|
||||
// want that
|
||||
let item = self.table.get(index).ok()?;
|
||||
Some(ValFuncRef::from_table_reference(item, &self.store))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user