Closed hasufell closed 6 years ago
I like this PR, should we merge it?
I don't really like the method name. Maybe something like convert
or convert_error
?
I have no strong opinion on the function name. This is just the best I could come up with.
There is a lot of _err
in std (Result::err
, unwrap_err
, is_err
), so I think convert_err
would be appropriate.
Also, could you update the changelog, add a test and update the doc/examples ?
@Yamakaky futures
use from_err
too, maybe follow this name is easier to understand.
https://docs.rs/futures/0.1.14/futures/future/trait.Future.html#method.from_err.
Right!
Also, could you update the changelog, add a test and update the doc/examples ?
^^
I tried to rebase this patch against master, but the addition of Option
impl broke this patch.
No idea who thought that is a good idea. Even the documentation of the trait is wrong now.
https://github.com/rust-lang-nursery/error-chain/blob/master/src/error_chain.rs#L334
Abandoning.
Is that ok? The macros are so complex I don't really know. But it compiles and works in my own project as expected. Also, didn't add any tests.