diff --git a/src/ptr.rs b/src/ptr.rs index fb47a2c..263b408 100644 --- a/src/ptr.rs +++ b/src/ptr.rs @@ -1,5 +1,6 @@ use std::{ any::Any, + fmt::Debug, marker::PhantomData, mem::ManuallyDrop, ops::{Deref, DerefMut}, @@ -32,6 +33,12 @@ impl DerefMut for OwnRef<'_, T> { } } +impl Debug for OwnRef<'_, T> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_tuple("OwnRef").field(&&**self).finish() + } +} + impl OwnRef<'_, T> { pub unsafe fn new_unchecked(p: NonNull) -> Self { Self(Some(p), PhantomData)