Skip to content

Conversation

@ddoktorski
Copy link
Contributor

[Refactor only]

@ddoktorski ddoktorski requested a review from a team as a code owner October 22, 2025 18:56
@ddoktorski ddoktorski requested review from MKowalski8, franciszekjob and ksew1 and removed request for a team October 22, 2025 18:56
This was referenced Oct 22, 2025
pub fn build_debugging_trace(
call_trace: &CallTrace,
contracts_data: &ContractsData,
contracts_data_store: &ContractsDataStore,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer this takes by value instead of cloning internally. For a larger structure like this, I think it's better to have clone calls clearly visible at caller site.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove cloning altogether

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the whole change is to not have to recreate the struct here, right?

pub fn build_debugging_trace(
call_trace: &CallTrace,
contracts_data: &ContractsData,
contracts_data_store: &ContractsDataStore,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove cloning altogether

@ddoktorski ddoktorski force-pushed the share-contracts-data-store branch from 1c1e984 to b5ef498 Compare October 24, 2025 12:01

/// Data structure containing information about contracts,
/// including their ABI, names, selectors and programs that will be used to create a [`Trace`](crate::Trace).
#[derive(Clone)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for derive now

Suggested change
#[derive(Clone)]

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.

4 participants