Skip to content

Commit f5adb93

Browse files
committed
Update tests
1 parent 1bbc6b0 commit f5adb93

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/unit/out/refcount/memcpy_struct_bytes.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ pub struct point {
1212
pub y: Value<i32>,
1313
}
1414
impl ByteRepr for point {
15+
fn byte_size() -> usize {
16+
8
17+
}
1518
fn to_bytes(&self, buf: &mut [u8]) {
1619
(*self.x.borrow()).to_bytes(&mut buf[0..4]);
1720
(*self.y.borrow()).to_bytes(&mut buf[4..8]);
@@ -45,7 +48,7 @@ fn main_0() -> i32 {
4548
{
4649
((dst.as_pointer()) as Ptr<point>).to_any().memcpy(
4750
&((buf.as_pointer() as Ptr<u8>) as Ptr<u8>).to_any(),
48-
::std::mem::size_of::<point>() as usize,
51+
8usize as usize,
4952
);
5053
((dst.as_pointer()) as Ptr<point>).to_any().clone()
5154
};

0 commit comments

Comments
 (0)