From ed573d054cccb5a893b9a7ef0b09386d71141f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Fri, 13 Jan 2023 10:10:53 +0100 Subject: [PATCH] Fix tests --- src/base/rkyv_wrappers.rs | 26 -------------------------- 1 file changed, 26 deletions(-) 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>, }