[wasmtime-api] reduce examples complexity: hostref for store/engine (#489)
* reduce amount of store.clone() * use HostRef Engine as ref / use Engine::default()
This commit is contained in:
@@ -34,9 +34,9 @@ pub(crate) struct WasmtimeFn {
|
||||
}
|
||||
|
||||
impl WasmtimeFn {
|
||||
pub fn new(store: HostRef<Store>, instance: InstanceHandle, export: Export) -> WasmtimeFn {
|
||||
pub fn new(store: &HostRef<Store>, instance: InstanceHandle, export: Export) -> WasmtimeFn {
|
||||
WasmtimeFn {
|
||||
store,
|
||||
store: store.clone(),
|
||||
instance,
|
||||
export,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user