diff --git a/packages/signals/src/lib.rs b/packages/signals/src/lib.rs index 2a30d0798..cfb25c96a 100644 --- a/packages/signals/src/lib.rs +++ b/packages/signals/src/lib.rs @@ -1,6 +1,6 @@ use std::{ cell::{Ref, RefMut}, - fmt::Display, + fmt::{Debug, Display}, ops::{Add, Div, Mul, Sub}, sync::Arc, }; @@ -92,6 +92,12 @@ impl Display for Signal { } } +impl Debug for Signal { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.with(|v| Debug::fmt(v, f)) + } +} + impl + Copy + 'static> std::ops::AddAssign for Signal { fn add_assign(&mut self, rhs: T) { self.set(self.get() + rhs);