diff --git a/src/send_sync_non_null.rs b/src/send_sync_non_null.rs index 57a4ea68e..64c1c3eee 100644 --- a/src/send_sync_non_null.rs +++ b/src/send_sync_non_null.rs @@ -1,3 +1,4 @@ +use std::fmt; use std::ptr::NonNull; /// A [`NonNull`] that is [`Send`]` + `[`Sync`]. @@ -17,7 +18,6 @@ use std::ptr::NonNull; /// /// though these are `unsafe` due to the raw pointers /// and potential [`Self::cast`] called in between. -#[derive(Debug)] #[repr(transparent)] pub struct SendSyncNonNull(NonNull); @@ -90,3 +90,10 @@ impl SendSyncNonNull { unsafe { Box::from_raw(ptr) } } } + +impl fmt::Debug for SendSyncNonNull { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Debug::fmt(&self.0, f) + } +}