Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upComparing Errors #1562
Comments
This comment has been minimized.
|
What's your use case? Matching on the error variant is usually the way to go. |
This comment has been minimized.
|
I'm trying to create my own ErrorKind setting the ConnectionError as the cause. |
added a commit
that referenced
this issue
Feb 17, 2018
sgrif
closed this
in
#1564
Feb 18, 2018
This comment has been minimized.
|
Nice one!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
derekdreery commentedFeb 17, 2018
It would be helpful if it were possible to compare errors using (Partial)Eq, and also implement things like Hash/Ord for datastructures. I'm not sure if this is really possible, but if not it may be possible to work around this by implementing PartialEq by making any trait object comparisons falsey.
What are your thoughts on this? Do you think it would be useful?