From f8b6afd57efc1a9e7e12fe1316bc45dcc6f32470 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 17 Feb 2026 00:17:43 +0100 Subject: fix object align bugs --- common/object/src/buffer.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/object/src/buffer.rs') diff --git a/common/object/src/buffer.rs b/common/object/src/buffer.rs index 1792d73..05557e4 100644 --- a/common/object/src/buffer.rs +++ b/common/object/src/buffer.rs @@ -19,6 +19,9 @@ impl ObjectBuffer { pub fn as_object<'a>(&'a self) -> Object<'a> { Object::load(&self.0).unwrap() } + pub fn to_bytes(self) -> Vec { + self.0.into_iter().flat_map(u32::to_le_bytes).collect() + } pub fn new(fields: &mut [(Tag, &dyn ValueStore)]) -> ObjectBuffer { let mut tags = Vec::new(); let mut offsets = Vec::new(); -- cgit v1.3