Skip to content

Commit

Permalink
appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
emo-eth committed Oct 23, 2024
1 parent 6efd19b commit 7746415
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/cheatcodes/src/test/revert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub(crate) fn handle_revert(
let expected_reason = revert_params.reason();
// If None, accept any revert.
let Some(expected_reason) = expected_reason else {
return Ok(Default::default());
return Ok(());
};

if !expected_reason.is_empty() && retdata.is_empty() {
Expand All @@ -49,7 +49,7 @@ pub(crate) fn handle_revert(

// Compare only the first 4 bytes if partial match.
if revert_params.partial_match() && actual_revert.get(..4) == expected_reason.get(..4) {
return Ok(Default::default())
return Ok(());
}

// Try decoding as known errors.
Expand All @@ -65,7 +65,7 @@ pub(crate) fn handle_revert(
if actual_revert == expected_reason ||
(is_cheatcode && memchr::memmem::find(&actual_revert, expected_reason).is_some())
{
Ok(Default::default())
Ok(())
} else {
let (actual, expected) = if let Some(contracts) = known_contracts {
let decoder = RevertDecoder::new().with_abis(contracts.iter().map(|(_, c)| &c.abi));
Expand Down

0 comments on commit 7746415

Please sign in to comment.