Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: remove variable on Felt252Dict get() #7012

Conversation

augustin-v
Copy link
Contributor

The intermediate variable return_value in the dict get() method is redundant since the value implements Copy
and can be used both in finalize and return statement without being moved.

Removed an unused variable in the tests as well

@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 2 files reviewed, 2 unresolved discussions (waiting on @augustin-v)


a discussion (no related file):
@gilbens-starkware for 2nd eye.


corelib/src/test/dict_test.cairo line 114 at r1 (raw file):

    dict.insert(11, nullable::nullable_from_box(BoxTrait::new(2)));
    let val10 = dict[10].deref();
    let val11 = dict[11].deref();

revert.

@augustin-v augustin-v force-pushed the dev/dict-get-remove-variable branch from cc196b6 to b0a5208 Compare January 6, 2025 18:14
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.

:lgtm:

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @augustin-v)

@augustin-v
Copy link
Contributor Author

@orizi Thank you for the review

Copy link
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @augustin-v)

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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @augustin-v)

@gilbens-starkware gilbens-starkware added this pull request to the merge queue Jan 7, 2025
Merged via the queue into starkware-libs:main with commit 7f60dfe Jan 7, 2025
47 checks passed
@augustin-v augustin-v deleted the dev/dict-get-remove-variable branch January 7, 2025 14:49
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