-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
changed function as_u64 to try_as_u64 #6970
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution! Before we can merge this, we need @anushkasomani to sign the Fuel Labs Contributor License Agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for the new method.
file directory? |
test/src/in_language_tests/test_programs/u128_inline_tests/src/main.sw right? |
I believe so, yes. |
This PR addresses Issue #6954 by renaming the as_u64 method in U128 to try_as_u64 to maintain consistency with other downcasting methods. The original as_u64 method has been deprecated with a warning to guide users toward the new naming convention.