mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 20:38:02 +00:00
Deserialize Box<Path> through PathBuf::into_boxed_path
Including Rc<Path> et al. Fixes https://github.com/serde-rs/serde/issues/1633
This commit is contained in:
@@ -907,6 +907,20 @@ declare_tests! {
|
||||
Token::ByteBuf(b"/usr/local/lib"),
|
||||
],
|
||||
}
|
||||
test_boxed_path {
|
||||
PathBuf::from("/usr/local/lib").into_boxed_path() => &[
|
||||
Token::Str("/usr/local/lib"),
|
||||
],
|
||||
PathBuf::from("/usr/local/lib").into_boxed_path() => &[
|
||||
Token::String("/usr/local/lib"),
|
||||
],
|
||||
PathBuf::from("/usr/local/lib").into_boxed_path() => &[
|
||||
Token::Bytes(b"/usr/local/lib"),
|
||||
],
|
||||
PathBuf::from("/usr/local/lib").into_boxed_path() => &[
|
||||
Token::ByteBuf(b"/usr/local/lib"),
|
||||
],
|
||||
}
|
||||
test_cstring {
|
||||
CString::new("abc").unwrap() => &[
|
||||
Token::Bytes(b"abc"),
|
||||
|
||||
Reference in New Issue
Block a user