diff options
Diffstat (limited to 'crates/parser/src')
| -rw-r--r-- | crates/parser/src/conversion.rs | 4 | ||||
| -rw-r--r-- | crates/parser/src/lib.rs | 2 | ||||
| -rw-r--r-- | crates/parser/src/module.rs | 2 | ||||
| -rw-r--r-- | crates/parser/src/visit.rs | 4 |
4 files changed, 5 insertions, 7 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 273dd44..86548d6 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -92,7 +92,7 @@ pub(crate) fn convert_module_import(import: wasmparser::Import<'_>) -> Result<Im ImportKind::Global(GlobalType { mutable: ty.mutable, ty: convert_valtype(&ty.content_type) }) } wasmparser::TypeRef::Tag(ty) => { - return Err(crate::ParseError::UnsupportedOperator(format!("Unsupported import kind: {ty:?}"))) + return Err(crate::ParseError::UnsupportedOperator(format!("Unsupported import kind: {ty:?}"))); } }, }) @@ -157,7 +157,7 @@ pub(crate) fn convert_module_export(export: wasmparser::Export<'_>) -> Result<Ex wasmparser::ExternalKind::Memory => ExternalKind::Memory, wasmparser::ExternalKind::Global => ExternalKind::Global, wasmparser::ExternalKind::Tag => { - return Err(crate::ParseError::UnsupportedOperator(format!("Unsupported export kind: {:?}", export.kind))) + return Err(crate::ParseError::UnsupportedOperator(format!("Unsupported export kind: {:?}", export.kind))); } }; diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index 04da9da..e5022c5 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -72,14 +72,12 @@ impl Parser { component_model: false, component_model_nested_names: false, component_model_values: false, - component_model_more_flags: false, exceptions: false, gc: false, memory_control: false, relaxed_simd: false, threads: false, shared_everything_threads: false, - component_model_multiple_returns: false, legacy_exceptions: false, component_model_async: false, }; diff --git a/crates/parser/src/module.rs b/crates/parser/src/module.rs index 9b31f9e..ff6b22b 100644 --- a/crates/parser/src/module.rs +++ b/crates/parser/src/module.rs @@ -1,5 +1,5 @@ use crate::log::debug; -use crate::{conversion, ParseError, Result}; +use crate::{ParseError, Result, conversion}; use alloc::string::ToString; use alloc::{boxed::Box, format, vec::Vec}; use tinywasm_types::{ diff --git a/crates/parser/src/visit.rs b/crates/parser/src/visit.rs index 89c27d1..2830d3a 100644 --- a/crates/parser/src/visit.rs +++ b/crates/parser/src/visit.rs @@ -531,11 +531,11 @@ impl<R: WasmModuleResources> wasmparser::VisitSimdOperator<'_> for FunctionBuild fn visit_i8x16_shuffle(&mut self, lanes: [u8; 16]) -> Self::Output { self.v128_constants.push(u128::from_le_bytes(lanes)); - self.instructions.push(Instruction::I8x16Shuffle(self.v128_constants.len() as u32 - 1).into()); + self.instructions.push(Instruction::I8x16Shuffle(self.v128_constants.len() as u32 - 1)); } fn visit_v128_const(&mut self, value: wasmparser::V128) -> Self::Output { self.v128_constants.push(value.i128() as u128); - self.instructions.push(Instruction::V128Const(self.v128_constants.len() as u32 - 1).into()); + self.instructions.push(Instruction::V128Const(self.v128_constants.len() as u32 - 1)); } } |
