Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handwrite Error conformance so thiserror is not needed #18

Merged
merged 3 commits into from
Jan 6, 2020

Conversation

SSheldon
Copy link
Contributor

#17 removed failure and instead just conformed Error to std::error::Error, which seems like a great change. Before seeing that change, I worked on a similar change for rss in rust-syndication/rss#82, although my approach turned out to be slightly different.

thiserror was used to implement the trait here, and while it seems like an awesome crate, I'm not sure the convenience is worth it for the cost of adding additional dependencies. Every dependency to this crate means more crates that users have to download, more versions for them to deal with, and longer compile times.

I handwrote an implementation of the trait, and while it's definitely more boilerplate, I don't think the ~30 extra lines are much of a maintenance burden, and it seems worth it to mean one less dependency in users' lockfiles.

@SSheldon
Copy link
Contributor Author

cc @nivekuil, if you've got any input here I'd appreciate it!

src/error.rs Outdated Show resolved Hide resolved
src/error.rs Outdated Show resolved Hide resolved
@DCjanus DCjanus merged commit 7f90336 into rust-syndication:master Jan 6, 2020
@SSheldon SSheldon deleted the rm_thiserror branch January 6, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants