mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 21:38:39 +00:00
Improved tests clarity
This commit is contained in:
20
lib/js-api/src/externals/function.rs
vendored
20
lib/js-api/src/externals/function.rs
vendored
@@ -33,17 +33,12 @@ pub struct VMFunctionBody(u8);
|
||||
/// with native functions. Attempting to create a native `Function` with one will
|
||||
/// result in a panic.
|
||||
/// [Closures as host functions tracking issue](https://github.com/wasmerio/wasmer/issues/1840)
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct Function {
|
||||
pub(crate) store: Store,
|
||||
pub(crate) exported: VMFunction,
|
||||
}
|
||||
|
||||
impl PartialEq for Function {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.exported == other.exported
|
||||
}
|
||||
}
|
||||
|
||||
impl wasmer_types::WasmValueType for Function {
|
||||
/// Write the value.
|
||||
unsafe fn write_value_to(&self, p: *mut i128) {
|
||||
@@ -761,19 +756,6 @@ impl<'a> Exportable<'a> for Function {
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for Function {
|
||||
fn clone(&self) -> Self {
|
||||
unimplemented!();
|
||||
// let mut exported = self.exported.clone();
|
||||
// exported.vm_function.upgrade_instance_ref().unwrap();
|
||||
|
||||
// Self {
|
||||
// store: self.store.clone(),
|
||||
// exported,
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Function {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
formatter
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use std::any::Any;
|
||||
use std::fmt;
|
||||
|
||||
/// The store represents all global state that can be manipulated by
|
||||
|
||||
Reference in New Issue
Block a user