Closed yuan-y-chang closed 2 weeks ago
We should support unit structure struct S; since struct S {} and struct S(); are allowed to derive DekuWrite.
struct S;
struct S {}
struct S();
DekuWrite
#[derive(DekuWrite)] // error: expected tuple struct or tuple variant, found unit struct `Zero` #[deku(magic = b"\x00")] struct Zero;
And DekuRead is no error here.
DekuRead
https://github.com/sharksforarms/deku/pull/450 should fix this.
We should support unit structure
struct S;
sincestruct S {}
andstruct S();
are allowed to deriveDekuWrite
.And
DekuRead
is no error here.