msgpack doesn't work with OsString
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Description
Take, for example, the following program:
```rust
use std::ffi::OsString;
fn main() {
let data = OsString::from("qwerty");
let serialized = rmp_serde::to_vec(&data).unwrap();
let deserialized: OsString = rmp_serde::from_slice(&serialized).unwrap();
}
```
The resultant code compiles, but panics at runtime:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax("invalid type: integer `0`, expected `Unix` or `Windows`")', src/libcore/result.rs:1188:5
```
The [Serde data model](https://serde.rs/data-model.html) does discuss the implementation of `OsString`.
My system configuration is as follows:
- `rustc 1.41.0`
- `rmp-serde 0.14.3`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.