1
Fork 0

Remove Layout::pad_to_unlign unwrap

This commit is contained in:
Christopher Durham 2019-11-09 15:38:53 -05:00 committed by GitHub
parent 183e61b661
commit 87b8ab3734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -751,7 +751,7 @@ impl<T: ?Sized> Arc<T> {
// reference (see #54908).
let layout = Layout::new::<ArcInner<()>>()
.extend(value_layout).unwrap().0
.pad_to_align().unwrap();
.pad_to_align();
let mem = Global.alloc(layout)
.unwrap_or_else(|_| handle_alloc_error(layout));