This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
impl Fail for NoneError? #59
Closed
Description
Using the currently (but probably not for very much longer) unstable Try
trait, one can use the question mark operator on Option<T>
types, coercing them into a Result<T, NoneError>
. Unfortunately, NoneError
does not impl std::error::Error
, meaning the Fail
is not implemented for NoneError
(and it being an external type, we can't implement it in our own crates).
I think this would be particularly useful in light of the pattern described in “Using the Error
type” — throwing a NoneError
fits right into the kind of rapid prototyping, "just show the user the error and exit" limited error handling that that exemplifies.
Would a PR with this change go amiss?
Metadata
Metadata
Assignees
Labels
No labels