You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.
I am personally trying out now a light variant of the custom Error + ErrorKind approach, where I have an ErrorKind but instead of a custom Error I just use type MyError = Context<MyErrorKind>;.
This works great for the usual from impl's but it doesn't help when I want to return try!(Err(ErrorKind::SomeKind)) directly.
Therefore I think it would be great to always have From<Inner> implemented for Context<Inner>. Right now I have to do try!(Err(Context::new(ErrorKind::SomeKind))) instead, or impl the from myself, but neither are nice things to do :).
The text was updated successfully, but these errors were encountered:
I am personally trying out now a light variant of the custom Error + ErrorKind approach, where I have an ErrorKind but instead of a custom Error I just use
type MyError = Context<MyErrorKind>;
.This works great for the usual from impl's but it doesn't help when I want to return
try!(Err(ErrorKind::SomeKind))
directly.Therefore I think it would be great to always have
From<Inner>
implemented forContext<Inner>
. Right now I have to dotry!(Err(Context::new(ErrorKind::SomeKind)))
instead, or impl the from myself, but neither are nice things to do :).The text was updated successfully, but these errors were encountered: