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
i8::MIN.next_multiple_of(-1) should return -128 (i8::MIN), but instead panics. The fix for this is to add if self == -1 { return self; } at the top of the method.
I have not checked, but it is certainly worth checking whether a similar situation applies with prev_multiple_of.
This is the only issue with the current implementation of next_multiple_of. It otherwise works as expected.
The text was updated successfully, but these errors were encountered:
i8::MIN.next_multiple_of(-1)
should return -128 (i8::MIN
), but instead panics. The fix for this is to addif self == -1 { return self; }
at the top of the method.I have not checked, but it is certainly worth checking whether a similar situation applies with
prev_multiple_of
.This is the only issue with the current implementation of
next_multiple_of
. It otherwise works as expected.The text was updated successfully, but these errors were encountered: