Skip to content

Commit

Permalink
Upgrade all dependencies (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored Dec 4, 2024
1 parent 7573a5a commit eddc2a7
Show file tree
Hide file tree
Showing 44 changed files with 295 additions and 268 deletions.
2 changes: 1 addition & 1 deletion crates/board/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@

## 0.1.0

<!-- Increment to skip CHANGELOG.md test: 0 -->
<!-- Increment to skip CHANGELOG.md test: 1 -->
2 changes: 1 addition & 1 deletion crates/board/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/board/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ usbd-serial = { version = "0.2.2", default-features = false, optional = true }
wasefire-error = { version = "0.1.2", path = "../error" }
wasefire-logger = { version = "0.1.6", path = "../logger" }
wasefire-protocol = { version = "0.2.0", path = "../protocol" }
wasefire-store = { version = "0.3.0", path = "../store", optional = true }
wasefire-store = { version = "0.3.1-git", path = "../store", optional = true }

[dependencies.wasefire-applet-api]
version = "0.7.1-git"
Expand Down Expand Up @@ -155,6 +155,7 @@ internal-software-crypto-hmac = ["dep:hmac"]
[lints]
clippy.unit-arg = "allow"
rust.missing-docs = "warn"
rust.unexpected_cfgs = { level = "allow", check-cfg = ["cfg(target_arch, values(\"spirv\"))"] }
rust.unreachable-pub = "warn"
rust.unsafe-op-in-unsafe-fn = "warn"
rust.unused-crate-dependencies = "warn"
1 change: 1 addition & 0 deletions crates/cli-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

### Patch

- Fix clippy lints
- Update dependencies

## 0.2.0
Expand Down
26 changes: 13 additions & 13 deletions crates/cli-tools/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/cli-tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all-features = true

[dependencies]
anyhow = { version = "1.0.86", default-features = false, features = ["std"] }
cargo_metadata = { version = "0.18.1", default-features = false, optional = true }
cargo_metadata = { version = "0.19.1", default-features = false, optional = true }
data-encoding = { version = "2.6.0", default-features = false, features = ["std"], optional = true }
flate2 = { version = "1.0.34", default-features = false, features = ["rust_backend"] }
humantime = { version = "2.1.0", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/cli-tools/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ impl RustAppletBuild {
if self.prod {
cargo.arg("-Zbuild-std=core,alloc");
let mut features = "-Zbuild-std-features=panic_immediate_abort".to_string();
if self.opt_level.map_or(false, OptLevel::optimize_for_size) {
if self.opt_level.is_some_and(OptLevel::optimize_for_size) {
features.push_str(",optimize_for_size");
}
cargo.arg(features);
Expand Down
2 changes: 1 addition & 1 deletion crates/cli-tools/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ use std::error::Error;
pub fn root_cause_is<E: Error + Send + Sync + 'static>(
error: &anyhow::Error, predicate: impl FnOnce(&E) -> bool,
) -> bool {
error.root_cause().downcast_ref::<E>().map_or(false, predicate)
error.root_cause().downcast_ref::<E>().is_some_and(predicate)
}
2 changes: 1 addition & 1 deletion crates/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@

## 0.1.0

<!-- Increment to skip CHANGELOG.md test: 1 -->
<!-- Increment to skip CHANGELOG.md test: 2 -->
27 changes: 13 additions & 14 deletions crates/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions crates/interpreter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.3.2-git

### Patch

- Fix clippy lints
- Update dependencies

## 0.3.1

### Minor
Expand Down
25 changes: 16 additions & 9 deletions crates/interpreter/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/interpreter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasefire-interpreter"
version = "0.3.1"
version = "0.3.2-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
Expand All @@ -21,7 +21,7 @@ wasefire-error = { version = "0.1.2", path = "../error" }

[dev-dependencies]
lazy_static = "1.4.0"
wast = "219.0.1"
wast = "221.0.2"

[features]
# Enable debugging features (only works for targets with std).
Expand Down
16 changes: 8 additions & 8 deletions crates/interpreter/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl<'m> Store<'m> {
let name = HostName { module, name };
check(self.func_default.is_none())?;
check(self.insts.is_empty())?;
check(self.funcs.last().map_or(true, |x| x.0 < name))?;
check(self.funcs.last().is_none_or(|x| x.0 < name))?;
self.funcs.push((name, type_));
Ok(())
}
Expand Down Expand Up @@ -903,7 +903,7 @@ impl<'m> Thread<'m> {
let s = self.pop_value().unwrap_i32() as usize;
let d = self.pop_value().unwrap_i32() as usize;
let mem = store.mem(inst_id, 0);
if core::cmp::max(s, d).checked_add(n).map_or(true, |x| x > mem.len() as usize) {
if core::cmp::max(s, d).checked_add(n).is_none_or(|x| x > mem.len() as usize) {
return Err(trap());
}
mem.data.copy_within(s .. s + n, d);
Expand All @@ -913,7 +913,7 @@ impl<'m> Thread<'m> {
let val = self.pop_value().unwrap_i32() as u8;
let d = self.pop_value().unwrap_i32() as usize;
let mem = store.mem(inst_id, 0);
if d.checked_add(n).map_or(true, |x| x > mem.len() as usize) {
if d.checked_add(n).is_none_or(|x| x > mem.len() as usize) {
memory_too_small(d, n, mem);
return Err(trap());
}
Expand Down Expand Up @@ -958,7 +958,7 @@ impl<'m> Thread<'m> {
let val = self.pop_value();
let i = self.pop_value().unwrap_i32() as usize;
let table = store.table(inst_id, x);
if i.checked_add(n).map_or(true, |x| x > table.elems.len()) {
if i.checked_add(n).is_none_or(|x| x > table.elems.len()) {
return Err(trap());
}
table.elems[i ..][.. n].fill(val);
Expand Down Expand Up @@ -1371,8 +1371,8 @@ impl<'m> Thread<'m> {
}

fn table_init(d: usize, s: usize, n: usize, table: &mut Table, elems: &[Val]) -> Result<(), Error> {
if s.checked_add(n).map_or(true, |x| x > elems.len())
|| d.checked_add(n).map_or(true, |x| x > table.elems.len())
if s.checked_add(n).is_none_or(|x| x > elems.len())
|| d.checked_add(n).is_none_or(|x| x > table.elems.len())
{
Err(trap())
} else {
Expand All @@ -1382,8 +1382,8 @@ fn table_init(d: usize, s: usize, n: usize, table: &mut Table, elems: &[Val]) ->
}

fn memory_init(d: usize, s: usize, n: usize, mem: &mut Memory, data: &[u8]) -> Result<(), Error> {
if s.checked_add(n).map_or(true, |x| x > data.len())
|| d.checked_add(n).map_or(true, |x| x > mem.len() as usize)
if s.checked_add(n).is_none_or(|x| x > data.len())
|| d.checked_add(n).is_none_or(|x| x > mem.len() as usize)
{
memory_too_small(d, n, mem);
Err(trap())
Expand Down
Loading

0 comments on commit eddc2a7

Please sign in to comment.