-
Notifications
You must be signed in to change notification settings - Fork 75
Implement Encoding for all Uints
#1016
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1016 +/- ##
=======================================
Coverage 79.86% 79.87%
=======================================
Files 163 163
Lines 17709 17737 +28
=======================================
+ Hits 14143 14167 +24
- Misses 3566 3570 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Note that this can be extended to replace #990 (possibly in a follow-up), and also |
|
What is up with the cross-compile tests? I think there's the same problem in |
|
Yeah, very strange |
|
Could it be caused by #1010? I notice they timeouted there too |
|
Huh, you're right, guess I didn't notice at the time I merged? Maybe we should enable some branch protections |
One thing lost from #1016 is the ability to convert from `Uint::Repr` and `hybrid_array::Array<u8, _>`. Arguably these cases should use the dedicated `ArrayEncoding`/`ArrayDecoding` traits for this purpose instead, but for the sake of retrofitting the changes from #1016 this adds back the ability to do these conversions for `EncodedUint` up to 16 limbs.
One thing lost from #1016 is the ability to convert from `Uint::Repr` and `hybrid_array::Array<u8, _>`. Arguably these cases should use the dedicated `ArrayEncoding`/`ArrayDecoding` traits for this purpose instead, but for the sake of retrofitting the changes from #1016 this adds back the ability to do these conversions for `EncodedUint` up to 16 limbs.
A part of #1008 that only deals with
Encoding:Encodingimplemented for allUints.Encoding::ReprforUintis now anEncodedUintstruct instead of an array.Encodingare removed.Encoding::Repr as TryFrom<&[u8]>from a concrete type to acore::error::Errortrait.