Closed Gorialis closed 2 years ago
yep, looks like a clear cut copy/paste error (I forgot to make the name of the Write builder different). My bad! thank you for the report. I'll try to get a fix out soon
actually wait I think this is already fixed on master, if you need a prerelease of 0.9.0 pushed to crates.io feel free to @ me.
This does indeed seem to be fixed on master. Thanks!
The following:
produces this error:
This error appears to be caused by the import line, and goes away if you adjust it to either
#[bw(import { threshold: u8 })]
or#[br(import { threshold: u8 })]
. This doesn't work for my use case, since both the reading and writing require state that isn't determinable statically.Note that the same thing occurs if you include both
bw
andbr
instead of onebrw
, and it doesn't go away if you use a different struct or arg names betweenbr
andbw
. (edit: It also doesn't go away if you don't derive Clone)This is with binrw
0.8.4
(checksuma13d2fa8772b88ee64a0d84602c636ad2bae9c176873f6c440e2b0a1df4c8c43
), rustc 1.60.0 with either the stable or nightly toolchain.