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

Introduce Value::as_i32 #732

Merged
merged 7 commits into from
Dec 12, 2024
Merged

Introduce Value::as_i32 #732

merged 7 commits into from
Dec 12, 2024

Conversation

matthiasgoergens
Copy link
Collaborator

@matthiasgoergens matthiasgoergens commented Dec 11, 2024

To help make #596 easier to read and reason about.

Also introduce a few more conversion helpers.

To help make #596 easier to
read and reason about.
Copy link
Collaborator

@bgillesp bgillesp left a comment

Choose a reason for hiding this comment

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

Seems like a reasonable utility function to add -- see just the one copy error in the doc comment for the new UInt function.

@@ -684,6 +684,11 @@ impl<'a, T: Into<u64> + From<u32> + Copy + Default> Value<'a, T> {
self.as_u64() as u32
}

/// Convert the limbs to a u32 value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy-paste error: should be Convert the limbs to an i32 value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

@matthiasgoergens matthiasgoergens merged commit 2cd6a6d into master Dec 12, 2024
6 checks passed
@matthiasgoergens matthiasgoergens deleted the matthias/as_i32 branch December 12, 2024 02:04
10to4 pushed a commit to 10to4/ceno that referenced this pull request Dec 12, 2024
To help make scroll-tech#596 easier to read
and reason about.

Also introduce a few more conversion helpers.
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