From 54213f77f6f80736024ea96bce59d3eff3c0e1ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 15:04:05 -0300 Subject: [PATCH] Update wasmi requirement from 0.20 to 0.21 (#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the requirements on [wasmi](https://github.com/paritytech/wasmi) to permit the latest version.
Release notes

Sourced from wasmi's releases.

v0.21.0 - 2023-01-04

Added

Fixed

Changed

Changelog

Sourced from wasmi's changelog.

[0.21.0] - 2023-01-04

Added

Fixed

Changed

[0.20.0] - 2022-11-04

Added

Removed

Fixed

Changed

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Theißen --- Cargo.toml | 2 +- benches/benches.rs | 2 +- src/stack_limiter/max_height.rs | 2 +- tests/overhead.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fcb576e..2686bae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ rand = "0.8" wat = "1" wasmparser = "0.96" wasmprinter = "0.2" -wasmi = "0.20" +wasmi = "0.21" [features] default = ["std"] diff --git a/benches/benches.rs b/benches/benches.rs index 155bb18..a777028 100644 --- a/benches/benches.rs +++ b/benches/benches.rs @@ -28,7 +28,7 @@ where { for entry in read_dir(fixture_dir()).unwrap() { let entry = entry.unwrap(); - let bytes = read(&entry.path()).unwrap(); + let bytes = read(entry.path()).unwrap(); group.throughput(Throughput::Bytes(bytes.len().try_into().unwrap())); group.bench_with_input(entry.file_name().to_str().unwrap(), &bytes, |bench, input| { bench.iter(|| f(deserialize_buffer(input).unwrap())) diff --git a/src/stack_limiter/max_height.rs b/src/stack_limiter/max_height.rs index 4be939b..fc0a030 100644 --- a/src/stack_limiter/max_height.rs +++ b/src/stack_limiter/max_height.rs @@ -176,7 +176,7 @@ pub fn compute(func_idx: u32, module: &elements::Module) -> Result {}, Block(ty) | Loop(ty) | If(ty) => { - let end_arity = if *ty == BlockType::NoResult { 0 } else { 1 }; + let end_arity = u32::from(*ty != BlockType::NoResult); let branch_arity = if let Loop(_) = *opcode { 0 } else { end_arity }; if let If(_) = *opcode { stack.pop_values(1)?; diff --git a/tests/overhead.rs b/tests/overhead.rs index c629275..7a57a97 100644 --- a/tests/overhead.rs +++ b/tests/overhead.rs @@ -48,9 +48,9 @@ fn size_overheads_all(files: ReadDir) -> Vec { let (original_module_len, orig_module) = { let bytes = match entry.path().extension().unwrap().to_str() { - Some("wasm") => read(&entry.path()).unwrap(), + Some("wasm") => read(entry.path()).unwrap(), Some("wat") => - wat::parse_bytes(&read(&entry.path()).unwrap()).unwrap().into_owned(), + wat::parse_bytes(&read(entry.path()).unwrap()).unwrap().into_owned(), _ => panic!("expected fixture_dir containing .wasm or .wat files only"), };