We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89e17b9 commit fe04710Copy full SHA for fe04710
src/int/big.rs
@@ -106,12 +106,7 @@ impl ops::Shr<u32> for u256 {
106
type Output = Self;
107
108
fn shr(self, rhs: u32) -> Self::Output {
109
- debug_assert!(rhs < Self::BITS, "attempted to shift right with overflow");
110
-
111
- if rhs >= Self::BITS {
112
- // Only happens when not in debug mode
113
- return Self::ZERO;
114
- }
+ assert!(rhs < Self::BITS, "attempted to shift right with overflow");
115
116
if rhs == 0 {
117
return self;
0 commit comments