Switch from failure::Fail to std's Error trait #127
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#118 simplified the
LinalgError
enum but also changed it from implementingError
to implementingFail
. This PR keeps the simplifications but changes it to implementError
again. (I also renamed theLapackFailure
variant toLapack
, renamed theShapeFailure
variant toShape
and changed it to a tuple, and removed the braces fromMemoryNotCont
.) IMO this is better for a few reasons:failure
is "experimental" and "currently evolving", so while it may be fine for an end-user application, I don't think we should use it for a library likendarray-linalg
.Error
is being updated based on thefailure
experiment to resolve most of the issues with the old version ofError
. (RFC 2504) In stable, the.source()
method has already been added,.cause()
is planned to be deprecated in 1.33, and.description()
is "soft-deprecated"..compat()
to get something that implementsError
.