Deserialize raw bytes into Vec<u8>
Open
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Description
Maybe I missed it, but I'm unable to deserialize a raw binary value as a `Vec`:
```rust
#[test]
fn some_test() {
let b = rmp_serde::to_vec(&rmpv::Value::Binary(vec![0u8; 16])).unwrap();
let v: Vec = 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.