mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 12:48:20 +00:00
Replace wasmparser::Result with wasmer::WasmResult in middleware
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::utils::get_store_with_middlewares;
|
||||
use anyhow::Result;
|
||||
|
||||
use std::sync::Arc;
|
||||
use wasmer::wasmparser::{Operator, Result as WpResult};
|
||||
use wasmer::wasmparser::Operator;
|
||||
use wasmer::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -28,7 +28,7 @@ impl FunctionMiddleware for Add2Mul {
|
||||
&mut self,
|
||||
operator: Operator<'a>,
|
||||
state: &mut MiddlewareReaderState<'a>,
|
||||
) -> WpResult<()> {
|
||||
) -> WasmResult<()> {
|
||||
match operator {
|
||||
Operator::I32Add => {
|
||||
state.push_operator(Operator::I32Mul);
|
||||
@@ -66,7 +66,7 @@ impl FunctionMiddleware for Fusion {
|
||||
&mut self,
|
||||
operator: Operator<'a>,
|
||||
state: &mut MiddlewareReaderState<'a>,
|
||||
) -> WpResult<()> {
|
||||
) -> WasmResult<()> {
|
||||
match (operator, self.state) {
|
||||
(Operator::I32Add, 0) => {
|
||||
self.state = 1;
|
||||
|
||||
Reference in New Issue
Block a user