cl-structures/intern: Debug-print interned objects with custom sigil
This commit is contained in:
parent
239785b322
commit
fcab20579a
@ -44,9 +44,8 @@ pub mod interned {
|
|||||||
|
|
||||||
impl<T: ?Sized + Debug> Debug for Interned<'_, T> {
|
impl<T: ?Sized + Debug> Debug for Interned<'_, T> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
f.debug_struct("Interned")
|
write!(f, "~")?;
|
||||||
.field("value", &self.value)
|
self.value.fmt(f)
|
||||||
.finish()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'a, T: ?Sized> Interned<'a, T> {
|
impl<'a, T: ?Sized> Interned<'a, T> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user