crowdagger / epub-builder

A Rust library for generating EPUB files
Mozilla Public License 2.0
135 stars 45 forks source link

Replace the use of eyre with our own error type #49

Closed ololduck closed 3 weeks ago

ololduck commented 1 month ago

This PR replaces the use of eyre with a custom error type, crate::Error, with the help of thiserror.

I was trying to include this library in my own library and encountered a bit of awkwardness regarding error handling, I hope to propose a solution that would be a bit more easy to use for other users of this lib.

Returning an eyre::Report in a library's public interface is also discouraged as per eyre's docs.

There is however a major issue with this PR, as this is a breaking public API change.

Love your work, epub handling is not something i want to do by hand :stuck_out_tongue:

EDIT: forgot to mention issue #30 which is heavily related.

crowdagger commented 3 weeks ago

yes it's a good idea even if it breaks api, thanks