Skip to content

Conversation

@Doryu001
Copy link
Contributor

@Doryu001 Doryu001 commented Nov 3, 2025

Bind sierra_program as mutable directly from SierraProgramWithDebug and drop the extra .clone() allocation. Remove the unused std::default::Default import from cairo-lang-test-plugin/src/lib.rs.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion


crates/cairo-lang-test-plugin/src/lib.rs line 162 at r1 (raw file):

 let replacer = DebugReplacer { db }; let mut sierra_program = sierra_program.clone();

the origianl sierra_program is a & - this must be cloned.
please check PRs before adding them.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @Doryu001)


crates/cairo-lang-test-plugin/src/lib.rs line 162 at r1 (raw file):

Previously, orizi wrote…

the origianl sierra_program is a & - this must be cloned.
please check PRs before adding them.

please just close the PR - this is definitely less efficient than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants