Skip to content

Commit bc89bd0

Browse files
committed
fmt
1 parent 44037db commit bc89bd0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

alloc/src/sync.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,6 @@ unsafe impl<#[may_dangle] T: ?Sized, A: Allocator> Drop for Arc<T, A> {
24762476
Likely decrement_strong_count or from_raw were called too many times.",
24772477
);
24782478

2479-
24802479
unsafe {
24812480
self.drop_slow();
24822481
}
@@ -3339,7 +3338,6 @@ static STATIC_INNER_SLICE: SliceArcInnerForStatic = SliceArcInnerForStatic {
33393338
},
33403339
};
33413340

3342-
33433341
#[cfg(not(no_global_oom_handling))]
33443342
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
33453343
impl Default for Arc<str> {
@@ -3365,9 +3363,11 @@ impl Default for Arc<core::ffi::CStr> {
33653363
fn default() -> Self {
33663364
use core::ffi::CStr;
33673365
let inner: NonNull<ArcInner<[u8]>> = NonNull::from(&STATIC_INNER_SLICE.inner);
3368-
let inner: NonNull<ArcInner<CStr>> = NonNull::new(inner.as_ptr() as *mut ArcInner<CStr>).unwrap();
3366+
let inner: NonNull<ArcInner<CStr>> =
3367+
NonNull::new(inner.as_ptr() as *mut ArcInner<CStr>).unwrap();
33693368
// `this` semantically is the Arc "owned" by the static, so make sure not to drop it.
3370-
let this: mem::ManuallyDrop<Arc<CStr>> = unsafe { mem::ManuallyDrop::new(Arc::from_inner(inner)) };
3369+
let this: mem::ManuallyDrop<Arc<CStr>> =
3370+
unsafe { mem::ManuallyDrop::new(Arc::from_inner(inner)) };
33713371
(*this).clone()
33723372
}
33733373
}
@@ -3388,7 +3388,8 @@ impl<T> Default for Arc<[T]> {
33883388
let inner: NonNull<SliceArcInnerForStatic> = NonNull::from(&STATIC_INNER_SLICE);
33893389
let inner: NonNull<ArcInner<[T; 0]>> = inner.cast();
33903390
// `this` semantically is the Arc "owned" by the static, so make sure not to drop it.
3391-
let this: mem::ManuallyDrop<Arc<[T; 0]>> = unsafe { mem::ManuallyDrop::new(Arc::from_inner(inner)) };
3391+
let this: mem::ManuallyDrop<Arc<[T; 0]>> =
3392+
unsafe { mem::ManuallyDrop::new(Arc::from_inner(inner)) };
33923393
return (*this).clone();
33933394
}
33943395

0 commit comments

Comments
 (0)