Maybe I missed it, but I'm unable to deserialize a raw binary value as a Vec<u8>:
#[test]
fn some_test() {
let b = rmp_serde::to_vec(&rmpv::Value::Binary(vec![0u8; 16])).unwrap();
let v: Vec<u8> = rmp_serde::from_read_ref(&b).unwrap();
}
running 1 test
thread 'tests::some_test' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax("invalid type: byte array, expected a sequence")', src/lib.rs:503:26
stack backtrace:
< not relevant >
AFAICT, it's the same issue with fixed arrays.
The only work around is to use rmp_serde::Raw, but that seems odd.
Maybe I missed it, but I'm unable to deserialize a raw binary value as a
Vec<u8>:AFAICT, it's the same issue with fixed arrays.
The only work around is to use
rmp_serde::Raw, but that seems odd.