You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted a trait to identify NonZero* integers (eg NonZeroU32) and my first thought was this crate. I didn't seem a trait for them.
In my very specific use case, I actually need a trait that relates the zero and non-zero unsigned integers. Of course, I can trivially create one, but this seems more useful in this pseudo-standard Rust crate.
I suppose there's a debate to be had as to whether NonNull would also implement such a trait. I'd argue not - rather there should be a super trait of NonZero and a sub trait of NonZeroInteger - but that's quite arguable either way.
The text was updated successfully, but these errors were encountered:
I wanted a trait to identify
NonZero*
integers (egNonZeroU32
) and my first thought was this crate. I didn't seem a trait for them.In my very specific use case, I actually need a trait that relates the zero and non-zero unsigned integers. Of course, I can trivially create one, but this seems more useful in this pseudo-standard Rust crate.
For example:-
and possibly
I suppose there's a debate to be had as to whether
NonNull
would also implement such a trait. I'd argue not - rather there should be a super trait ofNonZero
and a sub trait ofNonZeroInteger
- but that's quite arguable either way.The text was updated successfully, but these errors were encountered: