Skip to content

Commit

Permalink
clarify some variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Sep 22, 2024
1 parent 4c7c931 commit ada196d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xous-ipc/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ impl<'buf> Buffer<'buf> {
let writer = RkyvBuffer::from(&mut xous_buf.slice[..]);
let alloc = SubAllocator::new(&mut scratch);

let serbuf =
let serialized_buf =
rkyv::api::low::to_bytes_in_with_alloc::<_, _, Panic>(&wrap, writer, alloc).map_err(|_| ())?;
xous_buf.used = serbuf.pos();
xous_buf.used = serialized_buf.pos();
println!("pos: {}", xous_buf.used);
println!("scratch: {:x?}", &scratch[..16]);
Ok(xous_buf)
Expand Down Expand Up @@ -270,8 +270,9 @@ impl<'buf> Buffer<'buf> {
let writer = RkyvBuffer::from(&mut self.slice[..]);
let alloc = SubAllocator::new(&mut scratch);

let serbuf = rkyv::api::low::to_bytes_in_with_alloc::<_, _, Panic>(&wrap, writer, alloc).unwrap();
self.used = serbuf.pos();
let serialized_buf =
rkyv::api::low::to_bytes_in_with_alloc::<_, _, Panic>(&wrap, writer, alloc).unwrap();
self.used = serialized_buf.pos();

if let Some(ref mut msg) = self.memory_message.as_mut() {
msg.offset = MemoryAddress::new(self.used);
Expand Down

0 comments on commit ada196d

Please sign in to comment.