We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3824e76 + 2b2b16c commit 4387e7bCopy full SHA for 4387e7b
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