about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Bradshaw <mjbshaw@google.com>2022-03-22 20:42:03 -0600
committerGitHub <noreply@github.com>2022-03-22 20:42:03 -0600
commitf5dd42bce59bdd8ce5def70e2c87349434eb90a9 (patch)
treebba67f10dd9dbf22b4945aff875668d10dc6926e
parent3f7f5e8a2e3c9bb134d160241a6695bb379db647 (diff)
downloadrust-f5dd42bce59bdd8ce5def70e2c87349434eb90a9.tar.gz
rust-f5dd42bce59bdd8ce5def70e2c87349434eb90a9.zip
Format unsafe {} blocks
-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);