-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce duplication in error messages (#532)
* Reduce duplication in error messages This commit removes duplication in error messages where the same text would show up multiple times in a fully rendered error message. When using `derive(Error)` when the `#[from]` attribute is used there's no need to also render that payload into the error string because the `#[from]` establishes a "backtrace" which means that when the full context of an error is rendered it will include the `#[from]` in the lower frames of the backtrace anyway. This commit audits the `derive(Error)` implementations to avoid duplication in the rendered error messages, ensuring that if `#[from]` is used then the `#[from]` field isn't also rendered in the textual description. * Search the full error in wast assertions Don't just search the top error, but search the whole backtrace by using the `{:?}` format instead of `{}`.
- Loading branch information
1 parent
b58c2bf
commit 29c8c4f
Showing
6 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
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