summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2025-01-14 17:41:29 +0100
committerHenry Gressmann <mail@henrygressmann.de>2025-01-14 17:41:29 +0100
commit40e570cf8bdd948c1e7e9dd85e5ac24d9a062d2a (patch)
tree64e9338f1c656fd9d81f51cd4f425359b2dbc6d1 /crates
parent1a64f4092af9304694e98f441b79f0a93ee1c194 (diff)
chore: update deps, spelling
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates')
-rw-r--r--crates/parser/Cargo.toml2
-rw-r--r--crates/tinywasm/tests/test-wasm-3.rs2
-rw-r--r--crates/tinywasm/tests/testsuite/run.rs4
-rw-r--r--crates/tinywasm/tests/testsuite/util.rs12
4 files changed, 10 insertions, 10 deletions
diff --git a/crates/parser/Cargo.toml b/crates/parser/Cargo.toml
index 61224fd..f8eabb4 100644
--- a/crates/parser/Cargo.toml
+++ b/crates/parser/Cargo.toml
@@ -9,7 +9,7 @@ repository.workspace=true
rust-version.workspace=true
[dependencies]
-wasmparser={version="0.222", default-features=false, features=["validate", "features", "simd"]}
+wasmparser={version="0.223", default-features=false, features=["validate", "features", "simd"]}
log={workspace=true, optional=true}
tinywasm-types={version="0.9.0-alpha.0", path="../types", default-features=false}
diff --git a/crates/tinywasm/tests/test-wasm-3.rs b/crates/tinywasm/tests/test-wasm-3.rs
index 0bd2cb0..a0e2543 100644
--- a/crates/tinywasm/tests/test-wasm-3.rs
+++ b/crates/tinywasm/tests/test-wasm-3.rs
@@ -4,7 +4,7 @@ use testsuite::TestSuite;
use wasm_testsuite::data::{spec, SpecVersion};
fn main() -> Result<()> {
- if std::env::args().find(|x| x == "--enable").is_none() {
+ if !std::env::args().any(|x| &x == "--enable") {
println!("Skipping wasm-3 tests, use --enable to run");
return Ok(());
}
diff --git a/crates/tinywasm/tests/testsuite/run.rs b/crates/tinywasm/tests/testsuite/run.rs
index 7534142..0804266 100644
--- a/crates/tinywasm/tests/testsuite/run.rs
+++ b/crates/tinywasm/tests/testsuite/run.rs
@@ -8,8 +8,8 @@ use log::{debug, error, info};
use tinywasm::{Extern, Imports, ModuleInstance};
use tinywasm_types::{ExternVal, MemoryType, ModuleInstanceAddr, TableType, ValType, WasmValue};
use wasm_testsuite::data::TestFile;
-use wasm_testsuite::wast::{lexer::Lexer, parser::ParseBuffer, Wast};
use wasm_testsuite::wast;
+use wasm_testsuite::wast::{lexer::Lexer, parser::ParseBuffer, Wast};
#[derive(Default)]
struct ModuleRegistry {
@@ -171,7 +171,7 @@ impl TestSuite {
Ok(())
}
- pub fn run_file<'a>(&mut self, file: TestFile<'a>) -> Result<()> {
+ pub fn run_file(&mut self, file: TestFile<'_>) -> Result<()> {
let test_group = self.test_group(file.name(), file.parent());
let wast_raw = file.raw();
let wast = file.wast()?;
diff --git a/crates/tinywasm/tests/testsuite/util.rs b/crates/tinywasm/tests/testsuite/util.rs
index b555153..f8f862b 100644
--- a/crates/tinywasm/tests/testsuite/util.rs
+++ b/crates/tinywasm/tests/testsuite/util.rs
@@ -120,15 +120,15 @@ fn wastarg2tinywasmvalue(arg: wast::WastArg) -> Result<tinywasm_types::WasmValue
fn wast_i128_to_i128(i: wast::core::V128Pattern) -> u128 {
match i {
wast::core::V128Pattern::F32x4(f) => {
- f.iter().fold(0, |acc, &f| acc << 32 | nanpattern2tinywasmvalue(f).unwrap().as_f32().unwrap() as u128)
+ f.iter().fold(0, |acc, &f| (acc << 32) | nanpattern2tinywasmvalue(f).unwrap().as_f32().unwrap() as u128)
}
wast::core::V128Pattern::F64x2(f) => {
- f.iter().fold(0, |acc, &f| acc << 64 | nanpattern2tinywasmvalue(f).unwrap().as_f64().unwrap() as u128)
+ f.iter().fold(0, |acc, &f| (acc << 64) | nanpattern2tinywasmvalue(f).unwrap().as_f64().unwrap() as u128)
}
- wast::core::V128Pattern::I16x8(f) => f.iter().fold(0, |acc, &f| acc << 16 | f as u128),
- wast::core::V128Pattern::I32x4(f) => f.iter().fold(0, |acc, &f| acc << 32 | f as u128),
- wast::core::V128Pattern::I64x2(f) => f.iter().fold(0, |acc, &f| acc << 64 | f as u128),
- wast::core::V128Pattern::I8x16(f) => f.iter().fold(0, |acc, &f| acc << 8 | f as u128),
+ wast::core::V128Pattern::I16x8(f) => f.iter().fold(0, |acc, &f| (acc << 16) | f as u128),
+ wast::core::V128Pattern::I32x4(f) => f.iter().fold(0, |acc, &f| (acc << 32) | f as u128),
+ wast::core::V128Pattern::I64x2(f) => f.iter().fold(0, |acc, &f| (acc << 64) | f as u128),
+ wast::core::V128Pattern::I8x16(f) => f.iter().fold(0, |acc, &f| (acc << 8) | f as u128),
}
}