Skip to content

Commit

Permalink
Fix or silence wasmi_wast warnings (#1288)
Browse files Browse the repository at this point in the history
fix or silence wasmi_wast warnings
  • Loading branch information
Robbepop authored Nov 4, 2024
1 parent 5b344ca commit b604811
Showing 1 changed file with 6 additions and 4 deletions.
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 @@ impl WastRunner {

/// 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:?}")
}
};
let is_equal = match (result, expected) {
Expand Down Expand Up @@ -529,10 +530,11 @@ impl WastRunner {
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:?}")
}
};
let Some(val) = self.value(arg) else {
Expand Down

0 comments on commit b604811

Please sign in to comment.