about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/alloc/src/rc.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs
index 8e7946dfd97..858bbeb6bf3 100644
--- a/library/alloc/src/rc.rs
+++ b/library/alloc/src/rc.rs
@@ -2516,7 +2516,9 @@ trait RcInnerPtr {
         // missed optimization.
         // SAFETY: The reference count will never be zero when this is
         // called.
-        unsafe { core::intrinsics::assume(strong != 0); }
+        unsafe {
+            core::intrinsics::assume(strong != 0);
+        }
 
         let strong = strong.wrapping_add(1);
         self.strong_ref().set(strong);
@@ -2547,7 +2549,9 @@ trait RcInnerPtr {
         // missed optimization.
         // SAFETY: The reference count will never be zero when this is
         // called.
-        unsafe { core::intrinsics::assume(weak != 0); }
+        unsafe {
+            core::intrinsics::assume(weak != 0);
+        }
 
         let weak = weak.wrapping_add(1);
         self.weak_ref().set(weak);