Skip to content

Commit

Permalink
chore: Also format the control flow
Browse files Browse the repository at this point in the history
  • Loading branch information
chorman0773 committed Aug 21, 2024
1 parent 5f8cf71 commit 32bd5df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,11 +1330,11 @@ macro_rules! int_impl {
without modifying the original"]
#[inline]
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{
if rhs < Self::BITS {
// SAFETY:
// rhs is just checked to be in-range above
unsafe { self.unchecked_shl(rhs) }
}else{
} else {
0
}
}
Expand Down Expand Up @@ -1457,11 +1457,11 @@ macro_rules! int_impl {
without modifying the original"]
#[inline]
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{
if rhs < Self::BITS {
// SAFETY:
// rhs is just checked to be in-range above
unsafe { self.unchecked_shr(rhs) }
}else{
} else {
// A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits.

// SAFETY:
Expand Down
8 changes: 4 additions & 4 deletions core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1519,11 +1519,11 @@ macro_rules! uint_impl {
without modifying the original"]
#[inline]
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{
if rhs < Self::BITS {
// SAFETY:
// rhs is just checked to be in-range above
unsafe { self.unchecked_shl(rhs) }
}else{
} else {
0
}
}
Expand Down Expand Up @@ -1644,11 +1644,11 @@ macro_rules! uint_impl {
without modifying the original"]
#[inline]
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{
if rhs < Self::BITS {
// SAFETY:
// rhs is just checked to be in-range above
unsafe { self.unchecked_shr(rhs) }
}else{
} else {
0
}
}
Expand Down

0 comments on commit 32bd5df

Please sign in to comment.