summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--crates/tinywasm/tests/testsuite/mod.rs5
-rw-r--r--examples/wasm-rust.rs2
3 files changed, 4 insertions, 5 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 423e1ef..144d98d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@ serde={version="1.0", features=["derive"]}
[workspace.package]
version="0.9.0-alpha.0"
-rust-version="1.87"
+rust-version="1.88"
edition="2024"
license="MIT OR Apache-2.0"
authors=["Henry Gressmann <mail@henrygressmann.de>"]
diff --git a/crates/tinywasm/tests/testsuite/mod.rs b/crates/tinywasm/tests/testsuite/mod.rs
index 140b063..229bea6 100644
--- a/crates/tinywasm/tests/testsuite/mod.rs
+++ b/crates/tinywasm/tests/testsuite/mod.rs
@@ -79,13 +79,12 @@ impl TestSuite {
let last_line = BufReader::new(&file).lines().last().transpose()?;
// Check if the last line starts with the current commit
- if let Some(last) = last_line {
- if last.starts_with(version) {
+ if let Some(last) = last_line
+ && last.starts_with(version) {
// Truncate the file size to remove the last line
let len_to_truncate = last.len() as i64;
file.set_len(file.metadata()?.len() - len_to_truncate as u64 - 1)?;
}
- }
// Seek to the end of the file for appending
file.seek(SeekFrom::End(0))?;
diff --git a/examples/wasm-rust.rs b/examples/wasm-rust.rs
index d5a6b2a..82d5c93 100644
--- a/examples/wasm-rust.rs
+++ b/examples/wasm-rust.rs
@@ -109,7 +109,7 @@ fn hello() -> Result<()> {
imports.define(
"env",
"print_utf8",
- Extern::typed_func(|mut ctx: FuncContext<'_>, args: (i64, i32)| {
+ Extern::typed_func(|ctx: FuncContext<'_>, args: (i64, i32)| {
let mem = ctx.exported_memory("memory")?;
let ptr = args.0 as usize;
let len = args.1 as usize;