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

stdlib: remove decompose function for u256 #4802

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

anton-trunov
Copy link
Contributor

The From trait already lets one to decompose a u256 into four 64-bit words. Also, there is no compose for u256 (unlike b256, which has both at the moment).

Description

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.

The `From` trait already lets one to decompose a `u256` into
four 64-bit words. Also, there is no `compose` for `u256`
(unlike `b256`, which has both at the moment).
@anton-trunov anton-trunov added lib: std Standard library breaking May cause existing user code to break. Requires a minor or major release. labels Jul 15, 2023
@anton-trunov anton-trunov requested review from SwayStar123, Braqzen and a team July 15, 2023 09:05
@anton-trunov anton-trunov self-assigned this Jul 15, 2023
Copy link
Contributor

@Braqzen Braqzen left a comment

Choose a reason for hiding this comment

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

I don't believe this is a breaking change since the method is private and can only be used inside this file otherwise seems good to me.

@anton-trunov anton-trunov removed the breaking May cause existing user code to break. Requires a minor or major release. label Jul 15, 2023
@anton-trunov
Copy link
Contributor Author

Ah, good catch, didn't notice it lacks the pub keyword

@IGI-111 IGI-111 merged commit 0614787 into master Jul 17, 2023
@IGI-111 IGI-111 deleted the anton-trunov/remove-redundant-decompose-for-u256 branch July 17, 2023 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants