Skip to content

Commit

Permalink
Added as_deref to check_create_exit_reason
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed May 20, 2024
1 parent d815d28 commit 74b6b16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions evm-tests/jsontests/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,8 @@ pub fn test(

/// Check Exit Reason of EVM execution
fn check_create_exit_reason(reason: &ExitReason, expect_exception: &Option<String>) -> bool {
if let Some(expect_exception) = expect_exception {
if let Some(exception) = expect_exception.as_deref() {
if matches!(reason, ExitReason::Error(ExitError::CreateContractLimit)) {
let exception: &str = expect_exception.as_ref();
let check_result = exception == "TR_InitCodeLimitExceeded"
|| exception == "TransactionException.INITCODE_SIZE_EXCEEDED";
assert!(
Expand Down

0 comments on commit 74b6b16

Please sign in to comment.