Same display and debug impl for custom error?

Hi,
is there a simple way to set the same "impl" for display and debug for a custom error or should I have two times nearly the same code ?
thanks.
ffred

Of course you don't have to repeat all the code. You can implement Debug in terms of Display, just call Display::fmt(self, formatter) in the impl Debug for Error.

great, thank you !

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.