Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix or silence wasmi_wast warnings #1288

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions crates/wast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,11 @@

/// Asserts that `result` match the `expected` value.
fn assert_result(&self, result: &Val, expected: &WastRet) -> Result<()> {
#[allow(unreachable_patterns)] // TODO: remove once `wast v220` is used
let expected = match expected {
WastRet::Core(arg) => arg,
WastRet::Component(arg) => {
bail!("encountered unsupported component-model result: {arg:?}")
_ => {
bail!("encountered unsupported Wast result: {expected:?}")

Check warning on line 370 in crates/wast/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

crates/wast/src/lib.rs#L370

Added line #L370 was not covered by tests
}
};
let is_equal = match (result, expected) {
Expand Down Expand Up @@ -529,10 +530,11 @@
fn fill_params(&mut self, args: &[WastArg]) -> Result<()> {
self.params.clear();
for arg in args {
#[allow(unreachable_patterns)] // TODO: remove once `wast v220` is used
let arg = match arg {
WastArg::Core(arg) => arg,
WastArg::Component(arg) => {
bail!("encountered unsupported component-model argument: {arg:?}")
_ => {
bail!("encountered unsupported Wast argument: {arg:?}")

Check warning on line 537 in crates/wast/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

crates/wast/src/lib.rs#L537

Added line #L537 was not covered by tests
}
};
let Some(val) = self.value(arg) else {
Expand Down
Loading