mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 16:44:06 +02:00
fix size expressions
This commit is contained in:
parent
f5e329ab61
commit
b7fa549e79
3 changed files with 58 additions and 22 deletions
|
|
@ -6,10 +6,8 @@ use bitbuffer::{BitReadStream, Endianness};
|
|||
use bitbuffer_derive::{BitWrite, BitWriteSized};
|
||||
|
||||
#[derive(BitWrite)]
|
||||
struct TestStruct {
|
||||
foo: u8,
|
||||
struct TestSizeExpression {
|
||||
size: u8,
|
||||
#[size = "size + 2"]
|
||||
str: String,
|
||||
}
|
||||
|
||||
#[derive(BitWrite)]
|
||||
struct UnnamedSize(u8, #[size = 5] String, bool);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue