Closed mamscience closed 2 years ago
Hello
Can anyone explain why doesn't this work? (Using latest version of Deku and latest stable version of Rust)
use deku::*; #[derive(Debug, PartialEq, DekuRead, DekuWrite, Default)] struct Request2 { #[deku(skip, default = "1")] id: i16, header: i16, } let xol= Request2{header: 4};
Error
error[E0063]: missing field `id` in initializer of `Request2` --> device/src/lib.rs:91:15 | 91 | let xol= Request2{header2: 4}; | ^^^^^^^^ missing `id`
My bad, I misunderstood the function. I solved my issue using the 'derive builder' crate.
Hello
Can anyone explain why doesn't this work? (Using latest version of Deku and latest stable version of Rust)
Error