Simplify Layout::extend_packed
This commit is contained in:
parent
de17464b14
commit
2b2b16c2a4
1 changed files with 1 additions and 2 deletions
|
@ -310,8 +310,7 @@ impl Layout {
|
|||
pub fn extend_packed(&self, next: Self) -> Result<Self, LayoutErr> {
|
||||
let new_size = self.size().checked_add(next.size())
|
||||
.ok_or(LayoutErr { private: () })?;
|
||||
let layout = Layout::from_size_align(new_size, self.align())?;
|
||||
Ok(layout)
|
||||
Layout::from_size_align(new_size, self.align())
|
||||
}
|
||||
|
||||
/// Creates a layout describing the record for a `[T; n]`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue