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

TryFrom< B512 > for b256, u256 #6010

Merged
merged 23 commits into from
May 21, 2024
Merged

TryFrom< B512 > for b256, u256 #6010

merged 23 commits into from
May 21, 2024

Conversation

SwayStar123
Copy link
Member

@SwayStar123 SwayStar123 commented May 14, 2024

Description

Adds TryFrom implementation for b256 and u256 from B512

partially addresses #5797

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@SwayStar123 SwayStar123 self-assigned this May 14, 2024
@SwayStar123 SwayStar123 marked this pull request as ready for review May 15, 2024 07:26
@SwayStar123 SwayStar123 requested review from bitzoic and K1-R1 May 15, 2024 07:26
@SwayStar123 SwayStar123 added enhancement New feature or request lib: std Standard library labels May 15, 2024
@SwayStar123 SwayStar123 requested a review from K1-R1 May 16, 2024 04:59
K1-R1
K1-R1 previously approved these changes May 16, 2024
@SwayStar123 SwayStar123 requested review from K1-R1 and bitzoic May 17, 2024 05:46
Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

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

I'm curious why this is going in std rather than core?

@bitzoic
Copy link
Member

bitzoic commented May 20, 2024

I'm curious why this is going in std rather than core?

TryFrom is only included in std and B512 is not a primitive type

@SwayStar123 SwayStar123 enabled auto-merge (squash) May 21, 2024 05:14
@SwayStar123 SwayStar123 merged commit 10b7221 into master May 21, 2024
33 checks passed
@SwayStar123 SwayStar123 deleted the tryfromb512foru256b256 branch May 21, 2024 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants