Arnavion / derive-error-chain

A Macros 1.1 implementation of https://crates.io/crates/error-chain
19 stars 1 forks source link

Add support for generics #13

Closed jjedelsky closed 7 years ago

jjedelsky commented 7 years ago

This pull adds support for generics. See tests for examples.

Arnavion commented 7 years ago

@Yamakaky error-chain doesn't support generic errorkind, right?

jjedelsky commented 7 years ago

That is right, it doesn't.

Arnavion commented 7 years ago

Right, so error_chain errorkinds would no longer be guaranteed to be able to hold derive_error_chain errorkinds as chainable links. (Not a blocker, but worth noting.)

jjedelsky commented 7 years ago

I thing it should be enough not to implement From<generic> for Error.

Arnavion commented 7 years ago

Thanks!

I made some tiny changes: