Format unsafe {} blocks

This commit is contained in:
Michael Bradshaw 2022-03-22 20:42:03 -06:00 committed by GitHub
parent 3f7f5e8a2e
commit f5dd42bce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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);