Closed rustonaut closed 6 years ago
I also noticed that it does not expose the ErrorKind
making it impossible
to match the error kinds and convert it to a wrapper implementing Sync.
Sounds sensible. Would you be able to submit a PR?
Yes, probably not today but in the next 1-2 days.
On Sun, Jun 3, 2018, 15:04 Dirkjan Ochtman notifications@github.com wrote:
Sounds sensible. Would you be able to submit a PR?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/djc/askama/issues/92#issuecomment-394161060, or mute the thread https://github.com/notifications/unsubscribe-auth/AHR0kThO4AbLEHiNcpeAVdJnf6g40p5Iks5t497VgaJpZM4UU9hL .
Great, thanks!
Fixed by 12c920d7e34dae4934d52072ab9d8cb271d71058.
Errors from
error-chain
are notSync
, which can cause problems in some cases. E.g. if you want to/have to useFailure
which requiresSend+Sync
bounds.As
askama
doesn't really have many errors it should be simple.Currently askama has two foreign links and that's it:
::std::fmt::Error
(which is zero-sized)::serde_json::Error
(which is a custom error impl)I think it might be the best to roll a simple error enum, as people might use either
failure
orerror-chain
or custom errors and a simple error enum is compatible with all this ways (note that you would have to make it non-exhaustive)