Run rustfmt on liballoc.
This commit is contained in:
parent
81b3b27cf5
commit
5dcd406188
4 changed files with 39 additions and 25 deletions
|
@ -307,9 +307,7 @@ impl<T: ?Sized> Arc<T> {
|
|||
|
||||
if self.inner().weak.fetch_sub(1, Release) == 1 {
|
||||
atomic::fence(Acquire);
|
||||
deallocate(ptr as *mut u8,
|
||||
size_of_val(&*ptr),
|
||||
align_of_val(&*ptr))
|
||||
deallocate(ptr as *mut u8, size_of_val(&*ptr), align_of_val(&*ptr))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -722,11 +720,7 @@ impl<T: ?Sized> Drop for Weak<T> {
|
|||
// ref, which can only happen after the lock is released.
|
||||
if self.inner().weak.fetch_sub(1, Release) == 1 {
|
||||
atomic::fence(Acquire);
|
||||
unsafe {
|
||||
deallocate(ptr as *mut u8,
|
||||
size_of_val(&*ptr),
|
||||
align_of_val(&*ptr))
|
||||
}
|
||||
unsafe { deallocate(ptr as *mut u8, size_of_val(&*ptr), align_of_val(&*ptr)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1152,5 +1146,7 @@ impl<T: ?Sized> borrow::Borrow<T> for Arc<T> {
|
|||
|
||||
#[stable(since = "1.5.0", feature = "smart_ptr_as_ref")]
|
||||
impl<T: ?Sized> AsRef<T> for Arc<T> {
|
||||
fn as_ref(&self) -> &T { &**self }
|
||||
fn as_ref(&self) -> &T {
|
||||
&**self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue