bitcoin_internals/
wrap_debug.rs

1//! Contains a wrapper for a function that implements `Debug`.
2use core::fmt;
3
4/// A wrapper for a function that implements `Debug`.
5pub struct WrapDebug<F: Fn(&mut fmt::Formatter) -> fmt::Result>(pub F);
6
7impl<F: Fn(&mut fmt::Formatter) -> fmt::Result> fmt::Debug for WrapDebug<F> {
8    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (self.0)(f) }
9}