Skip to content

Commit

Permalink
Format unsafe {} blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbshaw authored Mar 23, 2022
1 parent 3f7f5e8 commit f5dd42b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f5dd42b

Please sign in to comment.