Skip to content
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

feat(primitivies): impl a handful of traits for fixed types #7565

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saiintbrisson
Copy link
Contributor

This change implements a handful of traits for fixed types:

  • The sum helper for iterators,
  • Rem/CheckedRem,
  • Signed/Unsigned and Num,
    • matching the bounds for the blanket impl for MultiplyArg to be used with PerThing,
  • and a companion function to_u32 to match to_float.

I'd also love to impl forward reference implementations for binops traits (Add<&Self> for Self, Add<Self> for &Self, etc), but this breaks the existing .into() calls as it turns the conversion ambiguous. Not sure if that's a price you are willing to pay, but would be very much appreciated.

@saiintbrisson saiintbrisson force-pushed the feat/primitivies/impl-sum-for-fixed-types branch 3 times, most recently from 9ea4117 to 85d920e Compare February 13, 2025 18:46
@saiintbrisson saiintbrisson force-pushed the feat/primitivies/impl-sum-for-fixed-types branch from 85d920e to 3944b6c Compare February 13, 2025 18:57
@saiintbrisson saiintbrisson marked this pull request as ready for review February 13, 2025 19:58
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