-
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
Add conversion methods for u256,b256 from tuple of u64s #5889
Conversation
My problem with this kind of conversions is endianess. As it is never clear which convention is being used and we always need to end up reading documentation. Why not simple named conversions? Like from_be_words, from_le_words etc... or anything similar. Also, it may also make sense to convert from and into arrays. |
There are already array conversions for both endians in the std lib for u16, u32, u64, b256 and u256 |
Co-authored-by: IGI-111 <igi-111@protonmail.com>
Description
Adds impl From<(u64, u64, u64, u64)> for u256, b256
Closes #5820
Checklist
Breaking*
orNew Feature
labels where relevant.