diff --git a/leptos_reactive/src/memo.rs b/leptos_reactive/src/memo.rs index 760a38d27c..d56c273adf 100644 --- a/leptos_reactive/src/memo.rs +++ b/leptos_reactive/src/memo.rs @@ -369,11 +369,10 @@ where impl Copy for Memo {} -impl fmt::Debug for Memo { +impl fmt::Debug for Memo { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut s = f.debug_struct("Memo"); - s.field("id", &self.id); - s.field("ty", &self.ty); + self.with_untracked(|v| s.field("inner", v)); #[cfg(any(debug_assertions, feature = "ssr"))] s.field("defined_at", &self.defined_at); s.finish() diff --git a/leptos_reactive/src/signal.rs b/leptos_reactive/src/signal.rs index 99062597f9..28c4ed5224 100644 --- a/leptos_reactive/src/signal.rs +++ b/leptos_reactive/src/signal.rs @@ -772,11 +772,10 @@ impl Clone for ReadSignal { impl Copy for ReadSignal {} -impl fmt::Debug for ReadSignal { +impl fmt::Debug for ReadSignal { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut s = f.debug_struct("ReadSignal"); - s.field("id", &self.id); - s.field("ty", &self.ty); + self.with_untracked(|v| s.field("inner", v)); #[cfg(any(debug_assertions, feature = "ssr"))] s.field("defined_at", &self.defined_at); s.finish() @@ -1224,11 +1223,10 @@ impl Clone for RwSignal { impl Copy for RwSignal {} -impl fmt::Debug for RwSignal { +impl fmt::Debug for RwSignal { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut s = f.debug_struct("RwSignal"); - s.field("id", &self.id); - s.field("ty", &self.ty); + self.with_untracked(|v| s.field("inner", v)); #[cfg(any(debug_assertions, feature = "ssr"))] s.field("defined_at", &self.defined_at); s.finish() diff --git a/leptos_reactive/src/signal_wrappers_read.rs b/leptos_reactive/src/signal_wrappers_read.rs index d703a6ee9a..8d9d3e8da3 100644 --- a/leptos_reactive/src/signal_wrappers_read.rs +++ b/leptos_reactive/src/signal_wrappers_read.rs @@ -91,7 +91,7 @@ impl Clone for Signal { impl Copy for Signal {} -impl core::fmt::Debug for Signal { +impl core::fmt::Debug for Signal { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut s = f.debug_struct("Signal"); s.field("inner", &self.inner); @@ -458,14 +458,14 @@ impl Clone for SignalTypes { impl Copy for SignalTypes {} -impl core::fmt::Debug for SignalTypes { +impl core::fmt::Debug for SignalTypes { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { match self { - Self::ReadSignal(arg0) => { - f.debug_tuple("ReadSignal").field(arg0).finish() - } - Self::Memo(arg0) => f.debug_tuple("Memo").field(arg0).finish(), - Self::DerivedSignal(_) => f.debug_tuple("DerivedSignal").finish(), + Self::ReadSignal(arg0) => arg0.fmt(f), + Self::Memo(arg0) => arg0.fmt(f), + Self::DerivedSignal(get) => get.with_value(|get| { + f.debug_tuple("DerivedSignal").field(&untrack(get)).finish() + }), } } } diff --git a/leptos_reactive/src/stored_value.rs b/leptos_reactive/src/stored_value.rs index 5344831e1d..4f26c4a1b2 100644 --- a/leptos_reactive/src/stored_value.rs +++ b/leptos_reactive/src/stored_value.rs @@ -43,12 +43,11 @@ impl Clone for StoredValue { impl Copy for StoredValue {} -impl fmt::Debug for StoredValue { +impl fmt::Debug for StoredValue { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("StoredValue") - .field("id", &self.id) - .field("ty", &self.ty) - .finish() + self.with_value(|v| { + f.debug_struct("StoredValue").field("inner", v).finish() + }) } }