(
state: &'a mut CalculatorState,
op: &str,
)
| 23 | } |
| 24 | |
| 25 | fn lookup_plugin<'a>( |
| 26 | state: &'a mut CalculatorState, |
| 27 | op: &str, |
| 28 | ) -> wasmtime::Result<&'a mut PluginDesc> { |
| 29 | state |
| 30 | .plugin_descs |
| 31 | .get_mut(op) |
| 32 | .ok_or(format_err!("unknown operation {}", op)) |
| 33 | } |
| 34 | |
| 35 | impl BinaryOperation { |
| 36 | fn run(self, state: &mut CalculatorState) -> wasmtime::Result<()> { |