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

Added TryInto::<u384, {u256,u128}>. #6326

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Added TryInto::<u384, {u256,u128}>. #6326

merged 1 commit into from
Sep 2, 2024

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Sep 1, 2024

This change is Reviewable

@ilyalesokhin-starkware
Copy link
Contributor

corelib/src/circuit.cairo line 510 at r1 (raw file):

    }

    pub fn to_u128(value: u384) -> Option<u128> {

Suggestion:

try_inoto_u128

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

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

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

Copy link
Collaborator Author

@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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)


corelib/src/circuit.cairo line 510 at r1 (raw file):

    }

    pub fn to_u128(value: u384) -> Option<u128> {

Done.

@ilyalesokhin-starkware
Copy link
Contributor

corelib/src/circuit.cairo line 482 at r2 (raw file):

    }

    impl AddHelperTo96By32Impl of AddHelper<

why is there a 'TO'?

Suggestion:

AddHelper96With32Impl

Copy link
Collaborator Author

@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: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware)


corelib/src/circuit.cairo line 482 at r2 (raw file):

Previously, ilyalesokhin-starkware wrote…

why is there a 'TO'?

the result is u96 in it becomes it by adding a u32.

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-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:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @orizi)

@orizi orizi added this pull request to the merge queue Sep 2, 2024
Merged via the queue into main with commit 36d1e18 Sep 2, 2024
44 checks passed
@orizi orizi deleted the orizi/circuit-from-u384 branch September 5, 2024 11:33
orizi added a commit that referenced this pull request Sep 8, 2024
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