2 ms·
I used to do this as well, but I came across thiserror (which is featured in the article), which is just macros that do exactly this and nothing more. It's cer
by nemothekid 7y ago
I used to do this as well, but I came across thiserror (which is featured in the article), which is just macros that do exactly this and nothing more.
It's certainly less transparent, but I prefer this method of error handling, and writing out the Impls manually can get out of hand (as well as having to adding new fields to the enum).