Summary of current issue
Error implementation could be made more elegant:
Cause is an unnecessary construct I think.
Why not just point to another relevant error?
So we just get a linked list.
- All relevant error constructs should implement error, so they behave like any other error in Rust, making it easier to use the library.
We can use the thiserror crate
Proposed change
Summary of current issue
Error implementation could be made more elegant:
Causeis an unnecessary construct I think.Why not just point to another relevant error?
So we just get a linked list.
We can use the thiserror crate
Proposed change
Causestruct.WithCausetrait toWithErr<T>, for relevant errorsParseErrandLexErrderiveErrorTypeErrand deriveErrorTypeErrstruct which has internal vector ofTypeErrsLet this struct also derive
Error.If we add a
newmethod which behaves similar to thenewofTypeErr, we can use this in all situations where we have to manually construct a vector of errors.UnimplementedErrderiveError