Implement Encoding for all Uints#1016
Merged
tarcieri merged 1 commit intoRustCrypto:masterfrom Nov 26, 2025
Merged
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:
|
Contributor
Author
|
Note that this can be extended to replace #990 (possibly in a follow-up), and also |
tarcieri
approved these changes
Nov 26, 2025
Contributor
Author
|
What is up with the cross-compile tests? I think there's the same problem in |
Member
|
Yeah, very strange |
Contributor
Author
|
Could it be caused by #1010? I notice they timeouted there too |
Member
|
Huh, you're right, guess I didn't notice at the time I merged? Maybe we should enable some branch protections |
Member
tarcieri
approved these changes
Nov 26, 2025
tarcieri
added a commit
that referenced
this pull request
Dec 29, 2025
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.
tarcieri
added a commit
that referenced
this pull request
Dec 29, 2025
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.