autoerr 0.0.5

Very opinionated helper to declare error types.
Documentation
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)
    }
}