Skip to content

Limb: add pub const fn encoding methods#1300

Merged
tarcieri merged 1 commit into
masterfrom
limb/const-fn-pub-encoding-methods
Jun 21, 2026
Merged

Limb: add pub const fn encoding methods#1300
tarcieri merged 1 commit into
masterfrom
limb/const-fn-pub-encoding-methods

Conversation

@tarcieri

Copy link
Copy Markdown
Member

Adds equivalents of all of the Encoding trait methods, but available as public const fns, including a new implementation of the forthcoming from_be_slice_truncated/from_le_slice_truncated methods.

@tarcieri tarcieri force-pushed the limb/const-fn-pub-encoding-methods branch from 0210df3 to b125f4a Compare June 21, 2026 17:12
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.36145% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.27%. Comparing base (12469b1) to head (3827e74).

Files with missing lines Patch % Lines
src/limb/encoding.rs 89.47% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1300      +/-   ##
==========================================
- Coverage   91.32%   91.27%   -0.05%     
==========================================
  Files         190      190              
  Lines       22619    22682      +63     
==========================================
+ Hits        20656    20703      +47     
- Misses       1963     1979      +16     

☔ View full report in Codecov by Harness.
📢 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.

Adds equivalents of all of the `Encoding` trait methods, but available
as public `const fn`s, including a new implementation of the forthcoming
`from_be_slice_truncated`/`from_le_slice_truncated` methods.
@tarcieri tarcieri force-pushed the limb/const-fn-pub-encoding-methods branch from b125f4a to 3827e74 Compare June 21, 2026 18:23
@tarcieri tarcieri merged commit da7ca41 into master Jun 21, 2026
32 checks passed
@tarcieri tarcieri deleted the limb/const-fn-pub-encoding-methods branch June 21, 2026 18:31
@tarcieri tarcieri mentioned this pull request Jun 22, 2026
tarcieri added a commit that referenced this pull request Jun 22, 2026
## Added
- `BoxedUint::{from_be_slice_truncated, from_le_slice_truncated}` (#1266)
- `Encoding::{from_bytes, to_bytes}` (#1297)
- `Uint::{from_be_slice_truncated, from_le_slice_truncated}` (#1299)
- `Limb::{from_*_bytes, from_*_slice_truncated, to_*_bytes}` as
  `const fn`s (#1300)
- `Encoding::{from_be_slice_truncated, from_le_slice_truncated}` trait
  methods (#1301)
- `ArrayEncoding::{from_byte_array, to_byte_array}` (#1302)

## Fixed
- Preserve `NonZero` and `Odd` invariants in `Zeroize` impls (#1287)
- `bitlen` performance (#1298)
- `floor_sqrt` regression (#1304)
- Truncated Karatsuba carry (#1305)
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.

1 participant