Unconditionally implement Debug for Handle

This commit is contained in:
Hanno Braun 2025-02-10 20:14:01 +01:00
parent 4bbf41644f
commit 32f2e92d64

View File

@ -29,7 +29,7 @@ impl fmt::Display for OperationDisplay<'_> {
}
}
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
#[derive(Eq, Ord, PartialEq, PartialOrd)]
pub struct Handle<T> {
inner: Rc<T>,
}
@ -72,6 +72,14 @@ impl<T> Deref for Handle<T> {
}
}
impl<T> fmt::Debug for Handle<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Handle")
.field("inner", &Rc::as_ptr(&self.inner))
.finish()
}
}
#[derive(Clone)]
pub struct AnyOp {
inner: Rc<dyn Operation>,