Remove pub(crate)
This commit is contained in:
parent
c8bae0f4b1
commit
9fa0722cf6
|
@ -137,7 +137,7 @@ extern crate libm;
|
|||
#[derive(Debug)]
|
||||
pub struct Trap {
|
||||
// Needs to be `pub(crate)` to allow `if let` matching in tests
|
||||
pub(crate) kind: TrapKind,
|
||||
kind: TrapKind,
|
||||
}
|
||||
|
||||
impl Trap {
|
||||
|
|
|
@ -338,21 +338,24 @@ fn resume_call_host_func_type_mismatch() {
|
|||
}
|
||||
|
||||
assert!(invocation.is_resumable());
|
||||
match invocation
|
||||
.resume_execution(val, &mut env)
|
||||
.unwrap_err()
|
||||
{
|
||||
ResumableError::Trap(Trap {
|
||||
kind: TrapKind::UnexpectedSignature,
|
||||
}) => {
|
||||
// success
|
||||
let err = invocation.resume_execution(val, &mut env).unwrap_err();
|
||||
|
||||
match &err {
|
||||
ResumableError::Trap(trap) => {
|
||||
if let TrapKind::UnexpectedSignature = trap.kind() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
other => panic!(
|
||||
"Expected `ResumableError::Trap(Trap {{ kind: \
|
||||
TrapKind::UnexpectedSignature, }})`, got `{:?}`",
|
||||
other
|
||||
),
|
||||
};
|
||||
_ => {}
|
||||
}
|
||||
|
||||
// If didn't return in the previous `match`...
|
||||
|
||||
panic!(
|
||||
"Expected `ResumableError::Trap(Trap {{ kind: \
|
||||
TrapKind::UnexpectedSignature, }})`, got `{:?}`",
|
||||
err
|
||||
)
|
||||
}
|
||||
|
||||
resume_with_val(None);
|
||||
|
|
Loading…
Reference in New Issue