Skip to content

Adding NonZero#23

Open
Apersoma wants to merge 3 commits intorust-num:mainfrom
Apersoma:main
Open

Adding NonZero#23
Apersoma wants to merge 3 commits intorust-num:mainfrom
Apersoma:main

Conversation

@Apersoma
Copy link
Copy Markdown

Adds NonZero as a type in PrimativeInteger

@cuviper
Copy link
Copy Markdown
Member

cuviper commented Mar 15, 2026

My initial reaction is that NonZero types could go the same way atomic types did (#24), into its own crate. However, the explicit links with unsigned Div<NonZero> etc. do make it seem appropriate to add here. But if we're going to do that, I would like to try to be complete about it as well, with something like trait NonZeroPrimitiveInteger and Signed/Unsigned sub types, and all their possible methods from the standard library as well.

Are you up for that? I could also experiment with that idea myself.

@Apersoma
Copy link
Copy Markdown
Author

I'm up for it, but I won't have time to do it for a while so feel free to do it yourself.

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