Skip to content

Conversation

@phrwlk
Copy link

@phrwlk phrwlk commented Nov 17, 2025

Motivation

let calldata = vm.current_call_frame.calldata.clone(); followed by gas_cost::tx_calldata(&calldata)?.
gas_cost::tx_calldata appears to consume by reference; cloning Bytes here is unnecessary.

Description

Replace a redundant clone of bytes::Bytes in validate_min_gas_limit by borrowing vm.current_call_frame.calldata directly when calling gas_cost::tx_calldata. The function only needs an immutable reference, and this matches existing patterns in get_intrinsic_gas and get_min_gas_used, so cloning was not required.

@phrwlk phrwlk requested a review from a team as a code owner November 17, 2025 18:54
MegaRedHand
MegaRedHand previously approved these changes Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants