-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: Replace thiserror with derive_more 1.0 (#624)
`derive_more` 1.0 can now be used as a more granular replacement for `thiserror`. The main changes required were: - Explicit derives for `Display` and `From`, in addition to `Error`. - Use `#[display(...)]` directives instead of `#[error(...)]`. The syntax is sightly different for referencing tuple elements (`_0` vs `0`). `error(transparent)` is also the default behaviour. - The new `From` derive is less intrusive (derives it for every variant non-`from(ignore)`d, unless explicit variants are picked with `#[from]`). Those changes are non-breaking (see first commit). Since the next release will be a breaking one, I included some cleanups too. - Added all missing `#[non_exhaustive]`s to the error enums (this missing is what caused the last breaking change). - Converted unary tuple variants into named structs. `derive_more` assumes unary tuples to be an error source, so we had to add `#[error(ignore)]` in some cases. - Add more contexts to some errors (e.g. adding the node id to errors that only printed the port offset). BREAKING CHANGE: Made all errors `non_exhaustive`, and renamed some fields for clarity.
- Loading branch information
Showing
19 changed files
with
241 additions
and
183 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.