mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 21:48:02 +00:00
Separate out the private functionality
This makes it easier when clicking through [src] links from rustdoc, not having to sift through public and internal code combined together.
This commit is contained in:
@@ -705,10 +705,10 @@ impl Field {
|
||||
// impl<'de: 'a, 'a> Deserialize<'de> for Cow<'a, str>
|
||||
// impl<'de: 'a, 'a> Deserialize<'de> for Cow<'a, [u8]>
|
||||
if is_cow(&field.ty, "str") {
|
||||
let path = syn::parse_path("_serde::de::private::borrow_cow_str").unwrap();
|
||||
let path = syn::parse_path("_serde::private::de::borrow_cow_str").unwrap();
|
||||
deserialize_with.set_if_none(path);
|
||||
} else if is_cow(&field.ty, "[u8]") {
|
||||
let path = syn::parse_path("_serde::de::private::borrow_cow_bytes").unwrap();
|
||||
let path = syn::parse_path("_serde::private::de::borrow_cow_bytes").unwrap();
|
||||
deserialize_with.set_if_none(path);
|
||||
}
|
||||
} else if is_rptr(&field.ty, "str") || is_rptr(&field.ty, "[u8]") {
|
||||
|
||||
Reference in New Issue
Block a user