mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
Implement Exportable for NativeFunc
This commit is contained in:
4
lib/api/src/externals/function.rs
vendored
4
lib/api/src/externals/function.rs
vendored
@@ -317,9 +317,9 @@ impl<'a> Exportable<'a> for Function {
|
||||
fn to_export(&self) -> Export {
|
||||
self.exported.clone().into()
|
||||
}
|
||||
fn get_self_from_extern(_extern: &'a Extern) -> Result<&'a Self, ExportError> {
|
||||
fn get_self_from_extern(_extern: &'a Extern) -> Result<Self, ExportError> {
|
||||
match _extern {
|
||||
Extern::Function(func) => Ok(func),
|
||||
Extern::Function(func) => Ok(func.clone()),
|
||||
_ => Err(ExportError::IncompatibleType),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user