diff --git a/src/core/matrix_array.rs b/src/core/matrix_array.rs index c344a3a3..86544ec0 100644 --- a/src/core/matrix_array.rs +++ b/src/core/matrix_array.rs @@ -312,14 +312,26 @@ impl Abomonation for MatrixArray N: Abomonation { unsafe fn entomb(&self, writer: &mut Vec) { - self.data.as_slice().entomb(writer) + for element in self.data.as_slice() { + element.entomb(writer); + } } unsafe fn embalm(&mut self) { - self.data.as_slice().embalm() + for element in self.data.as_mut_slice() { + element.embalm(); + } } - unsafe fn exhume<'a, 'b>(&'a mut self, bytes: &'b mut [u8]) -> Option<&'b mut [u8]> { - self.data.as_slice().exhume(bytes) + unsafe fn exhume<'a, 'b>(&'a mut self, mut bytes: &'b mut [u8]) -> Option<&'b mut [u8]> { + for element in self.data.as_mut_slice() { + let temp = bytes; + bytes = if let Some(remainder) = element.exhume(temp) { + remainder + } else { + return None; + } + } + Some(bytes) } }