rusty-xinput icon indicating copy to clipboard operation
rusty-xinput copied to clipboard

Implement std::error::Error to ease type erasure

Open MaulingMonkey opened this issue 6 years ago • 1 comments

Box<Error>::from(...) is implemented by default for anything that implements Error, and ? uses from by default, making this handy for anything dealing with multiple error types.

  • Since CI targets 1.24.0, implement the soft-deprecated description()
  • Implementing Error requires implementing Display.
  • Also ignore warnings about not using &dyn Debug while we're at it.

MaulingMonkey avatar Jul 17 '19 19:07 MaulingMonkey

I wanted to go the opposite direction and have it be no_std, but we could probably put this behind a feature flag if so.

I'll let this sit a bit and think on it

Lokathor avatar Jul 18 '19 00:07 Lokathor