blob: 631cce2b0bb934d23cfc8c83093a25e3ebaa608a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use zerocopy_derive::*;
#[path = "formats/coco_static_size.rs"]
mod format;
#[derive(IntoBytes, KnownLayout, Immutable)]
#[repr(C, align(2))]
struct MinimalViableSource {
bytes: [u8; 6],
}
#[unsafe(no_mangle)]
fn bench_try_transmute_ref_static_size(
source: &MinimalViableSource,
) -> Option<&format::CocoPacket> {
zerocopy::try_transmute_ref!(source).ok()
}
|