impl From<anyhow::Error> for Trap (#1753)
* From<anyhow::Error> for Trap * Add TrapReason::Error * wasmtime: Improve Error to Trap conversion * Remove Trap::message
This commit is contained in:
@@ -90,9 +90,8 @@ fn test_returns_incorrect_type() -> Result<()> {
|
||||
.call(&[])
|
||||
.expect_err("the execution should fail")
|
||||
.downcast::<Trap>()?;
|
||||
assert_eq!(
|
||||
trap.message(),
|
||||
"function attempted to return an incompatible value"
|
||||
);
|
||||
assert!(trap
|
||||
.to_string()
|
||||
.contains("function attempted to return an incompatible value"));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user