diff --git a/src/base/rkyv_wrappers.rs b/src/base/rkyv_wrappers.rs index b11c618a..ce178674 100644 --- a/src/base/rkyv_wrappers.rs +++ b/src/base/rkyv_wrappers.rs @@ -9,32 +9,6 @@ use rkyv::{ use std::marker::PhantomData; /// A wrapper that allows for changing the generic type of a PhantomData. -/// -/// Example: -/// -/// ```rust -/// use std::marker::PhantomData; -/// use rkyv::{ -/// Archive, Serialize, Deserialize, Infallible, vec::ArchivedVec, Archived, with::With, -/// }; -/// use rkyv_wrappers::custom_phantom::CustomPhantom; -/// #[derive(Archive, Serialize, Deserialize, Debug, PartialEq, Eq, Default)] -/// #[archive(as = "StructWithPhantom", bound(archive = " -/// T: Archive, -/// With, CustomPhantom>>: Archive>> -/// "))] -/// struct StructWithPhantom { -/// pub num: i32, -/// #[with(CustomPhantom)] -/// pub phantom: PhantomData, -/// } -/// let value = StructWithPhantom::>::default(); -/// let bytes = rkyv::to_bytes::<_, 1024>(&value).unwrap(); -/// let archived: &StructWithPhantom> = unsafe { rkyv::archived_root::>>(&bytes) }; -/// -/// let deserialized: StructWithPhantom> = archived.deserialize(&mut Infallible).unwrap(); -/// assert_eq!(deserialized, value); -/// ``` pub struct CustomPhantom { _data: PhantomData<*const NT>, }