chore: Also format the control flow

This commit is contained in:
Connor Horman 2024-08-21 21:23:25 +00:00
parent c89bae0ea8
commit 38b5a2a67e
2 changed files with 8 additions and 8 deletions

View File

@ -1330,11 +1330,11 @@ macro_rules! int_impl {
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{ pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{ if rhs < Self::BITS {
// SAFETY: // SAFETY:
// rhs is just checked to be in-range above // rhs is just checked to be in-range above
unsafe { self.unchecked_shl(rhs) } unsafe { self.unchecked_shl(rhs) }
}else{ } else {
0 0
} }
} }
@ -1457,11 +1457,11 @@ macro_rules! int_impl {
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{ pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{ if rhs < Self::BITS {
// SAFETY: // SAFETY:
// rhs is just checked to be in-range above // rhs is just checked to be in-range above
unsafe { self.unchecked_shr(rhs) } 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. // A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits.
// SAFETY: // SAFETY:

View File

@ -1519,11 +1519,11 @@ macro_rules! uint_impl {
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{ pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{ if rhs < Self::BITS {
// SAFETY: // SAFETY:
// rhs is just checked to be in-range above // rhs is just checked to be in-range above
unsafe { self.unchecked_shl(rhs) } unsafe { self.unchecked_shl(rhs) }
}else{ } else {
0 0
} }
} }
@ -1644,11 +1644,11 @@ macro_rules! uint_impl {
without modifying the original"] without modifying the original"]
#[inline] #[inline]
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{ pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
if rhs < Self::BITS{ if rhs < Self::BITS {
// SAFETY: // SAFETY:
// rhs is just checked to be in-range above // rhs is just checked to be in-range above
unsafe { self.unchecked_shr(rhs) } unsafe { self.unchecked_shr(rhs) }
}else{ } else {
0 0
} }
} }