diff options
Diffstat (limited to 'rust/zerocopy/benches/read_from_bytes.rs')
| -rw-r--r-- | rust/zerocopy/benches/read_from_bytes.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/zerocopy/benches/read_from_bytes.rs b/rust/zerocopy/benches/read_from_bytes.rs new file mode 100644 index 000000000..8a3baddad --- /dev/null +++ b/rust/zerocopy/benches/read_from_bytes.rs @@ -0,0 +1,7 @@ +#[path = "formats/coco_static_size.rs"] +mod format; + +#[unsafe(no_mangle)] +fn bench_read_from_bytes_static_size(source: &[u8]) -> Option<format::LocoPacket> { + zerocopy::FromBytes::read_from_bytes(source).ok() +} |
