1
Fork 0

Remove Layout::pad_to_align unwrap

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

View file

@ -897,7 +897,7 @@ impl<T: ?Sized> Rc<T> {
// reference (see #54908).
let layout = Layout::new::<RcBox<()>>()
.extend(value_layout).unwrap().0
.pad_to_align().unwrap();
.pad_to_align();
// Allocate for the layout.
let mem = Global.alloc(layout)