Merge pull request #2939 from Mingun/remove-actually-private

Remove `actually_private::T`
This commit is contained in:
Oli Scherer
2025-06-06 06:39:39 +00:00
committed by GitHub
3 changed files with 4 additions and 22 deletions
+1 -5
View File
@@ -1226,11 +1226,7 @@ pub trait Deserializer<'de>: Sized {
// Not public API. // Not public API.
#[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))] #[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))]
#[doc(hidden)] #[doc(hidden)]
fn __deserialize_content<V>( fn __deserialize_content<V>(self, visitor: V) -> Result<V::Value, Self::Error>
self,
_: crate::actually_private::T,
visitor: V,
) -> Result<crate::__private::de::Content<'de>, Self::Error>
where where
V: Visitor<'de, Value = crate::__private::de::Content<'de>>, V: Visitor<'de, Value = crate::__private::de::Content<'de>>,
{ {
-5
View File
@@ -340,8 +340,3 @@ extern crate serde_derive;
#[cfg(feature = "serde_derive")] #[cfg(feature = "serde_derive")]
#[cfg_attr(docsrs, doc(cfg(feature = "derive")))] #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
pub use serde_derive::{Deserialize, Serialize}; pub use serde_derive::{Deserialize, Serialize};
#[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))]
mod actually_private {
pub struct T;
}
+3 -12
View File
@@ -208,7 +208,6 @@ mod content {
use crate::lib::*; use crate::lib::*;
use crate::actually_private;
use crate::de::value::{MapDeserializer, SeqDeserializer}; use crate::de::value::{MapDeserializer, SeqDeserializer};
use crate::de::{ use crate::de::{
self, size_hint, Deserialize, DeserializeSeed, Deserializer, EnumAccess, Expected, self, size_hint, Deserialize, DeserializeSeed, Deserializer, EnumAccess, Expected,
@@ -298,7 +297,7 @@ mod content {
// Untagged and internally tagged enums are only supported in // Untagged and internally tagged enums are only supported in
// self-describing formats. // self-describing formats.
let visitor = ContentVisitor { value: PhantomData }; let visitor = ContentVisitor { value: PhantomData };
deserializer.__deserialize_content(actually_private::T, visitor) deserializer.__deserialize_content(visitor)
} }
} }
@@ -1498,11 +1497,7 @@ mod content {
visitor.visit_unit() visitor.visit_unit()
} }
fn __deserialize_content<V>( fn __deserialize_content<V>(self, visitor: V) -> Result<V::Value, Self::Error>
self,
_: actually_private::T,
visitor: V,
) -> Result<Content<'de>, Self::Error>
where where
V: Visitor<'de, Value = Content<'de>>, V: Visitor<'de, Value = Content<'de>>,
{ {
@@ -2091,11 +2086,7 @@ mod content {
visitor.visit_unit() visitor.visit_unit()
} }
fn __deserialize_content<V>( fn __deserialize_content<V>(self, visitor: V) -> Result<V::Value, Self::Error>
self,
_: actually_private::T,
visitor: V,
) -> Result<Content<'de>, Self::Error>
where where
V: Visitor<'de, Value = Content<'de>>, V: Visitor<'de, Value = Content<'de>>,
{ {