mirror of
https://github.com/fluencelabs/interface-types
synced 2025-06-21 02:31:36 +00:00
feat(interface-types) Change Instance::local_or_import(&self)
to Instance::local_or_import(&mut self)
.
It allows the instance to create or update locals/imports when the `local_or_import` function is called. It's not ideal, but fine enough for a first step.
This commit is contained in:
@ -68,8 +68,8 @@ macro_rules! test_executable_instruction {
|
||||
(&vec![$($instructions),*]).try_into().unwrap();
|
||||
|
||||
let invocation_inputs = vec![$($invocation_inputs),*];
|
||||
let instance = $instance;
|
||||
let run = interpreter.run(&invocation_inputs, &instance);
|
||||
let mut instance = $instance;
|
||||
let run = interpreter.run(&invocation_inputs, &mut instance);
|
||||
|
||||
assert!(run.is_ok());
|
||||
|
||||
@ -102,8 +102,8 @@ macro_rules! test_executable_instruction {
|
||||
(&vec![$($instructions),*]).try_into().unwrap();
|
||||
|
||||
let invocation_inputs = vec![$($invocation_inputs),*];
|
||||
let instance = $instance;
|
||||
let run = interpreter.run(&invocation_inputs, &instance);
|
||||
let mut instance = $instance;
|
||||
let run = interpreter.run(&invocation_inputs, &mut instance);
|
||||
|
||||
assert!(run.is_err());
|
||||
|
||||
|
Reference in New Issue
Block a user