Skip to content

Conversation

@fjarri
Copy link
Contributor

@fjarri fjarri commented Nov 26, 2025

A part of #1008 that only deals with Encoding:

  • Encoding implemented for all Uints. Encoding::Repr for Uint is now an EncodedUint struct instead of an array.
  • Macros deriving Encoding are removed.
  • Relaxed the bound on the error of Encoding::Repr as TryFrom<&[u8]> from a concrete type to a core::error::Error trait.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 91.56627% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.87%. Comparing base (5784b13) to head (ecb405d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/uint/encoding.rs 90.41% 7 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fjarri
Copy link
Contributor Author

fjarri commented Nov 26, 2025

Note that this can be extended to replace #990 (possibly in a follow-up), and also Encoding can be implemented for BoxedUint.

@fjarri
Copy link
Contributor Author

fjarri commented Nov 26, 2025

What is up with the cross-compile tests? I think there's the same problem in master?

@tarcieri
Copy link
Member

Yeah, very strange

@fjarri
Copy link
Contributor Author

fjarri commented Nov 26, 2025

Could it be caused by #1010? I notice they timeouted there too

@tarcieri
Copy link
Member

Huh, you're right, guess I didn't notice at the time I merged?

Maybe we should enable some branch protections

@tarcieri
Copy link
Member

@fjarri all right, #1017 reverted #1010, can you try rebasing?

@tarcieri tarcieri merged commit e9f0efd into RustCrypto:master Nov 26, 2025
26 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants