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
There exist traits for wrapping_add, wrapping_sub, wrapping_mul, wrapping_shl, wrapping_shr and wrapping_neg. Is there a reason why there isn't a trait for wrapping div and wrapping rem?
The text was updated successfully, but these errors were encountered:
No particular reason, just that nobody has wanted them yet.
I'm not sure it's very useful to have these in generic contexts -- the only input that actually wraps is signed MIN / -1. Division by zero still panics, at least. But if you have a use case, I wouldn't mind a pull request for new traits.
There exist traits for wrapping_add, wrapping_sub, wrapping_mul, wrapping_shl, wrapping_shr and wrapping_neg. Is there a reason why there isn't a trait for wrapping div and wrapping rem?
The text was updated successfully, but these errors were encountered: