Skip to content

Commit 4b09f25

Browse files
authored
chore: avoid cloning bytecode in prank delegate check (#12341)
1 parent 272439c commit 4b09f25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/cheatcodes/src/evm/prank.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn prank(
132132
// Ensure that code exists at `msg.sender` if delegate calling.
133133
if delegate_call {
134134
ensure!(
135-
account.info.clone().code.is_some_and(|code| !code.is_empty()),
135+
account.info.code.as_ref().is_some_and(|code| !code.is_empty()),
136136
"cannot `prank` delegate call from an EOA"
137137
);
138138
}

0 commit comments

Comments
 (0)