Skip to content

Commit 6eb6aee

Browse files
fixed unsafe block
1 parent f453fab commit 6eb6aee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/alloc/src/sync.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -3308,8 +3308,10 @@ impl Default for Arc<str> {
33083308
fn default() -> Self {
33093309
let arc: Arc<[u8]> = Default::default();
33103310
debug_assert!(core::str::from_utf8(&*arc).is_ok());
3311-
let (ptr, alloc) = Arc::internal_into_inner_with_allocator(arc);
3312-
unsafe { Arc::from_ptr_in(ptr.as_ptr() as *mut ArcInner<str>, alloc) }
3311+
unsafe {
3312+
let (ptr, alloc) = Arc::internal_into_inner_with_allocator(arc);
3313+
Arc::from_ptr_in(ptr.as_ptr() as *mut ArcInner<str>, alloc)
3314+
}
33133315
}
33143316
}
33153317

0 commit comments

Comments
 (0)