We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Layout::extend_packed
1 parent de17464 commit 2b2b16cCopy full SHA for 2b2b16c
src/libcore/alloc.rs
@@ -310,8 +310,7 @@ impl Layout {
310
pub fn extend_packed(&self, next: Self) -> Result<Self, LayoutErr> {
311
let new_size = self.size().checked_add(next.size())
312
.ok_or(LayoutErr { private: () })?;
313
- let layout = Layout::from_size_align(new_size, self.align())?;
314
- Ok(layout)
+ Layout::from_size_align(new_size, self.align())
315
}
316
317
/// Creates a layout describing the record for a `[T; n]`.
0 commit comments