mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
Pass thru buffer serialize Err
It is more helpful to pass thru the error because "couldn't serialize" does not help the developer to resolve the issue.
This commit is contained in:
parent
ac8decce88
commit
00af36d6de
1 changed files with 1 additions and 1 deletions
|
|
@ -230,7 +230,7 @@ impl<'a> Buffer<'a> {
|
|||
let copied_slice =
|
||||
unsafe { core::slice::from_raw_parts_mut(self.slice.as_mut_ptr(), self.slice.len()) };
|
||||
let mut ser = rkyv::ser::serializers::BufferSerializer::new(copied_slice);
|
||||
let pos = ser.serialize_value(&src).or(Err("couldn't serialize"))?;
|
||||
let pos = ser.serialize_value(&src).map_err(|err| err).unwrap();
|
||||
self.offset = MemoryAddress::new(pos);
|
||||
if let Some(ref mut msg) = self.memory_message.as_mut() {
|
||||
msg.offset = MemoryAddress::new(pos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue