1 2 3 4 5 6 7 8 9 10
use core::fmt; #[derive(Debug)] pub struct Dbg<T: fmt::Debug>(pub T); impl<T: fmt::Debug> fmt::Display for Dbg<T> { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt::Debug::fmt(&self.0, fmt) } }