3 ms·
> It's very common to derive(Debug), and if the debug impl is only accessible via a method, then derive(Debug) doesn't work. The right way of doing this is to
by zozbot234 4y ago
> It's very common to derive(Debug), and if the debug impl is only accessible via a method, then derive(Debug) doesn't work.
The right way of doing this is to define custom attributes as part of derive(Debug) and derive(Display); the derive mechanism can already do this. There's no need for a wrapper type to be used.
- burntsushi 4y agoYes, it may very well be the case that this is the answer. But that feature is not stable today. It would be great to re-evaluate once that's available.