Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Sep 24, 2024
1 parent 89e17b9 commit fe04710
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/int/big.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,7 @@ impl ops::Shr<u32> for u256 {
type Output = Self;

fn shr(self, rhs: u32) -> Self::Output {
debug_assert!(rhs < Self::BITS, "attempted to shift right with overflow");

if rhs >= Self::BITS {
// Only happens when not in debug mode
return Self::ZERO;
}
assert!(rhs < Self::BITS, "attempted to shift right with overflow");

if rhs == 0 {
return self;
Expand Down

0 comments on commit fe04710

Please sign in to comment.