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

Conversion improvements for Felt252 #927

Merged
merged 5 commits into from
Mar 29, 2023
Merged

Conversion improvements for Felt252 #927

merged 5 commits into from
Mar 29, 2023

Conversation

Oppen
Copy link
Contributor

@Oppen Oppen commented Mar 29, 2023

  • New fn to_be_bytes(&self) -> [u8; 32] method
  • New fn to_u128(&self) -> Option<u128> method
  • Unroll to_le_bytes for more obvious reading
  • Proptests for all three methods

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

- New `fn to_be_bytes(&self) -> [u8; 32]` method
- New `fn to_u128(&self) -> Option<u128>` method
- Unroll `to_le_bytes` for more obvious reading
- Proptests for all three methods
Copy link
Contributor

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

Nice!

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #927 (fe21f33) into main (d5824b8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #927      +/-   ##
==========================================
+ Coverage   97.44%   97.45%   +0.01%     
==========================================
  Files          70       70              
  Lines       29039    29155     +116     
==========================================
+ Hits        28296    28412     +116     
  Misses        743      743              
Impacted Files Coverage Δ
felt/src/bigint_felt.rs 96.08% <100.00%> (+0.01%) ⬆️
felt/src/lib.rs 90.09% <100.00%> (+0.49%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

felt/src/lib.rs Outdated Show resolved Hide resolved
felt/src/lib.rs Outdated Show resolved Hide resolved
@Oppen Oppen mentioned this pull request Mar 29, 2023
@Oppen Oppen added this pull request to the merge queue Mar 29, 2023
Merged via the queue into main with commit eebfd61 Mar 29, 2023
@Oppen Oppen deleted the felt_conversions branch March 29, 2023 21:30
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.

3 participants