Implemented std::error::Error and std::fmt::Display traits for nom::Err #1043
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #591
I came across this issue when I worked with nom. I thought having the
Error
andDisplay
trait onnom::Err
might be very helpful.When I poked around the code I realized that there already was an old implementation that was commented out. Referring to the mentioned issue it might have been because of
Error::description
. But because this is now deprecated anyway I considered opening a PR.If the removal of the old
Error
andDisplay
implementations had other reasons, feel free to close this PR.