Skip to content

Commit 32f2e92

Browse files
committed
Unconditionally implement Debug for Handle
1 parent 4bbf416 commit 32f2e92

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

experiments/2024-12-09/src/geometry/operation.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl fmt::Display for OperationDisplay<'_> {
2929
}
3030
}
3131

32-
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
32+
#[derive(Eq, Ord, PartialEq, PartialOrd)]
3333
pub struct Handle<T> {
3434
inner: Rc<T>,
3535
}
@@ -72,6 +72,14 @@ impl<T> Deref for Handle<T> {
7272
}
7373
}
7474

75+
impl<T> fmt::Debug for Handle<T> {
76+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
77+
f.debug_struct("Handle")
78+
.field("inner", &Rc::as_ptr(&self.inner))
79+
.finish()
80+
}
81+
}
82+
7583
#[derive(Clone)]
7684
pub struct AnyOp {
7785
inner: Rc<dyn Operation>,

0 commit comments

Comments
 (0)