onlyerror 0.1.5

Obsessively tiny error derive macro
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![allow(dead_code)]

#[derive(Debug, onlyerror::Error)]
#[no_display]
enum Error {
    First,
    Second(usize),
    Third { key: String, value: Vec<usize> },
}

impl core::fmt::Display for Error {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::result::Result<(), core::fmt::Error> {
        write!(f, "Should work")
    }
}

fn main() {}