#[derive(BinRead,)]
#[br(little)]
pub struct Meta {
/// ID
pub id: [u8; 6],
/// Serial number
#[br(pad_before = 1, parse_with = binrw::helpers::until_eof, try_map = String::from_utf8)]
pub serial_number: String,
}
it seems to no longer work in 0.13, giving me
error[E0308]: `?` operator has incompatible types
--> src/lib.rs:11:10
|
11 | #[derive(BinRead)]
| ^^^^^^^ expected `Vec<u8>`, found `String`
|
= note: `?` operator cannot convert from `std::string::String` to `Vec<u8>`
= note: expected struct `Vec<u8>`
found struct `std::string::String`
note: return type inferred to be `Vec<u8>` here
--> src/lib.rs:11:10
|
11 | #[derive(BinRead)]
| ^^^^^^^
= note: this error originates in the derive macro `BinRead` (in Nightly builds, run with -Z macro-backtrace for more info)
help: call `Into::into` on this expression to convert `std::string::String` into `Vec<u8>`
|
11 | #[derive(BinRead.into())]
| +++++++
For more information about this error, try `rustc --explain E0308`.
this works in 0.11
it seems to no longer work in 0.13, giving me