about summary refs log tree commit diff
diff options
context:
space:
mode:
authorConnor Horman <chorman64@gmail.com>2024-08-21 21:23:25 +0000
committerConnor Horman <chorman64@gmail.com>2024-08-21 21:23:25 +0000
commit38b5a2a67e64e8a02c4bee9bd0314e5023a559cb (patch)
tree1e4fe1d7f8a329fc56ff9b7f8d6639c7128a7afc
parentc89bae0ea8f2b6c04ff26a14f8dd37eaa9bc2f0b (diff)
downloadrust-38b5a2a67e64e8a02c4bee9bd0314e5023a559cb.tar.gz
rust-38b5a2a67e64e8a02c4bee9bd0314e5023a559cb.zip
chore: Also format the control flow
-rw-r--r--library/core/src/num/int_macros.rs8
-rw-r--r--library/core/src/num/uint_macros.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs
index b22311da1e3..b48b05577c9 100644
--- a/library/core/src/num/int_macros.rs
+++ b/library/core/src/num/int_macros.rs
@@ -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
             }
         }
@@ -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:
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs
index b8ca299f67d..f09fd604dc6 100644
--- a/library/core/src/num/uint_macros.rs
+++ b/library/core/src/num/uint_macros.rs
@@ -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
             }
         }
@@ -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
             }
         }