mirror of https://github.com/rust-lang/rust.git
chore: Also format the control flow
This commit is contained in:
parent
c89bae0ea8
commit
38b5a2a67e
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue