Use unwrap_err.

This commit is contained in:
Stephen Chung
2023-04-10 23:23:59 +08:00
parent 20c535ecd3
commit 8662ffec62
24 changed files with 100 additions and 153 deletions

View File

@@ -86,7 +86,7 @@ fn test_constant_mut() -> Result<(), Box<EvalAltResult>> {
MY_NUMBER.value = 42;
"
)
.expect_err("should error"),
.unwrap_err(),
EvalAltResult::ErrorNonPureMethodCallOnConstant(..)
));
@@ -119,7 +119,7 @@ fn test_constant_mut() -> Result<(), Box<EvalAltResult>> {
assert!(matches!(
*engine
.run_with_scope(&mut scope, "MY_NUMBER.value = 42;")
.expect_err("should error"),
.unwrap_err(),
EvalAltResult::ErrorNonPureMethodCallOnConstant(..)
));