Skip to content

Commit 32bd5df

Browse files
committed
chore: Also format the control flow
1 parent 5f8cf71 commit 32bd5df

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: core/src/num/int_macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1330,11 +1330,11 @@ macro_rules! int_impl {
13301330
without modifying the original"]
13311331
#[inline]
13321332
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
1333-
if rhs < Self::BITS{
1333+
if rhs < Self::BITS {
13341334
// SAFETY:
13351335
// rhs is just checked to be in-range above
13361336
unsafe { self.unchecked_shl(rhs) }
1337-
}else{
1337+
} else {
13381338
0
13391339
}
13401340
}
@@ -1457,11 +1457,11 @@ macro_rules! int_impl {
14571457
without modifying the original"]
14581458
#[inline]
14591459
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
1460-
if rhs < Self::BITS{
1460+
if rhs < Self::BITS {
14611461
// SAFETY:
14621462
// rhs is just checked to be in-range above
14631463
unsafe { self.unchecked_shr(rhs) }
1464-
}else{
1464+
} else {
14651465
// A shift by `Self::BITS-1` suffices for signed integers, because the sign bit is copied for each of the shifted bits.
14661466

14671467
// SAFETY:

Diff for: core/src/num/uint_macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1519,11 +1519,11 @@ macro_rules! uint_impl {
15191519
without modifying the original"]
15201520
#[inline]
15211521
pub const fn unbounded_shl(self, rhs: u32) -> $SelfT{
1522-
if rhs < Self::BITS{
1522+
if rhs < Self::BITS {
15231523
// SAFETY:
15241524
// rhs is just checked to be in-range above
15251525
unsafe { self.unchecked_shl(rhs) }
1526-
}else{
1526+
} else {
15271527
0
15281528
}
15291529
}
@@ -1644,11 +1644,11 @@ macro_rules! uint_impl {
16441644
without modifying the original"]
16451645
#[inline]
16461646
pub const fn unbounded_shr(self, rhs: u32) -> $SelfT{
1647-
if rhs < Self::BITS{
1647+
if rhs < Self::BITS {
16481648
// SAFETY:
16491649
// rhs is just checked to be in-range above
16501650
unsafe { self.unchecked_shr(rhs) }
1651-
}else{
1651+
} else {
16521652
0
16531653
}
16541654
}

0 commit comments

Comments
 (0)