//! Format wrappers for Zebra use std::fmt; pub struct DisplayToDebug(pub T); impl fmt::Debug for DisplayToDebug where T: fmt::Display, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.0.fmt(f) } } pub struct SummaryDebug(pub T); impl fmt::Debug for SummaryDebug> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}, len={}", std::any::type_name::(), self.0.len()) } } impl fmt::Debug for SummaryDebug<&Vec> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}, len={}", std::any::type_name::(), self.0.len()) } }