Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Nov 21, 2023
1 parent d0c9569 commit b6e271a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/vm/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::value::{
U64,
};
use crate::{data, elem, memory, stack, table, value};
use wasmparser::{BlockType, FuncType, Type, ValType};
use wasmparser::{BlockType, FuncType, ValType};

use std::convert::TryInto;
use std::{ops::*, usize};
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::value::Value;
use anyhow::Result;
use std::iter;
use wasmparser::ValType;
use wasmparser::{FuncType, FunctionBody, Type};
use wasmparser::{FuncType, FunctionBody};

#[derive(Clone, Copy, Debug)]
pub struct InstIndex(pub u32);
Expand Down
3 changes: 0 additions & 3 deletions crates/vm/src/inst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ impl WasmInstPayloadFrom<BrTable<'_>> for BrTableData {
}
}

type I8x16ShuffleLanes = Vec<u8>;
pub type SIMDLaneIndex = u8;

for_each_operator!(define_instr_kind);

pub fn transform_inst(
Expand Down
5 changes: 2 additions & 3 deletions crates/vm/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ use crate::module::{
};
use crate::table::{self, TableInstance};
use crate::value::{NumVal, RefType, RefVal, Value};
use anyhow::{Context, Result};
use anyhow::Result;
use std::cell::RefCell;
use std::collections::HashMap;
use std::rc::Rc;
use wasmparser::{
Data, DataKind, Element, ElementItem, ElementKind, FuncType, FunctionBody, Global, GlobalType,
Import, MemoryType, NameSectionReader, TableType, Type, ValType,
Import, MemoryType, NameSectionReader, TableType, ValType,
};

#[derive(Default)]
Expand Down Expand Up @@ -282,7 +282,6 @@ impl Store {
for entry in section {
match entry? {
wasmparser::Type::Func(fn_ty) => types.push(fn_ty),
_ => panic!("module type is not supported yet"),
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/wast-spec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl WastContext {
fn module(&mut self, mut wat: QuoteWat<'_>) -> Result<()> {
let module_id = match &wat {
wast::QuoteWat::Wat(Wat::Module(m)) => m.id,
wast::QuoteWat::QuoteModule(_, bytes) => None,
wast::QuoteWat::QuoteModule(_, _) => None,
_ => panic!(),
};
let module_name = module_id.map(|id| id.name());
Expand Down Expand Up @@ -175,7 +175,7 @@ impl WastContext {
}
AssertUnlinkable {
span,
mut module,
module,
message,
} => {
let err = match self.module(QuoteWat::Wat(module)) {
Expand Down Expand Up @@ -233,7 +233,7 @@ impl WastContext {
module.push(' ');
}
let buf = wast::parser::ParseBuffer::new(&module).map_err(adjust_wast)?;
let mut wat = wast::parser::parse::<wast::Wat>(&buf).map_err(|mut e| {
let wat = wast::parser::parse::<wast::Wat>(&buf).map_err(|mut e| {
e.set_text(&module);
e
})?;
Expand Down

0 comments on commit b6e271a

Please sign in to comment.