Skip to content

Define Uint division traits generically#1232

Merged
tarcieri merged 4 commits intoRustCrypto:masterfrom
andrewwhitehead:feat/generic-uint-div
Mar 24, 2026
Merged

Define Uint division traits generically#1232
tarcieri merged 4 commits intoRustCrypto:masterfrom
andrewwhitehead:feat/generic-uint-div

Conversation

@andrewwhitehead
Copy link
Copy Markdown
Contributor

This should support all the old div/rem trait implementations but with better test coverage, as well as Uint/BoxedUint and Uint/UintRef operations.

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.67%. Comparing base (5d6c04f) to head (88a8d68).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1232      +/-   ##
==========================================
+ Coverage   88.07%   88.67%   +0.60%     
==========================================
  Files         185      185              
  Lines       21298    21298              
==========================================
+ Hits        18759    18887     +128     
+ Misses       2539     2411     -128     

☔ 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.

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@tarcieri tarcieri merged commit b0887d7 into RustCrypto:master Mar 24, 2026
31 checks passed
@tarcieri
Copy link
Copy Markdown
Member

Looks like that got us to 90% test coverage, rounding up, according to the badge anyway

@tarcieri tarcieri mentioned this pull request Mar 25, 2026
tarcieri added a commit that referenced this pull request Mar 25, 2026
## Added
- `#[inline]` attributes for shift and wrapping arithmetic ops (#1229)
- `MontyForm::{is_zero, is_one}` methods (#1230)
- `Gcd` supertrait bound to `Unsigned`/`Signed` traits (#1231)

## Changed
- Define `Uint` division traits generically (#1232)
- Use generic implementation of bit operations for `Wrapping` (#1235)
- Explicitly seal `MontyForm` (#1237)
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