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:
David Tolnay committed 2017-04-07 09:46:48 -07:00
1 parent 467b5fc595
commit 726eea9a97
17 files changed
+2653 -2651

No files matched your search

+2 -2
View File
@@ -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]") {