Open
Conversation
Open
2550ac7 to
4727ad0
Compare
madsmtm
reviewed
Feb 4, 2025
src/errors.rs
Outdated
| @@ -86,7 +86,14 @@ impl<T> std::error::Error for SendError<T> {} | |||
| /// before sending any message, or if a message has already been received on the channel. | |||
| #[cfg(any(feature = "std", feature = "async"))] | |||
| #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] | |||
There was a problem hiding this comment.
Maybe consider removing Copy too? Otherwise it'd be harder to expand with containing e.g. a String.
Owner
Author
There was a problem hiding this comment.
Good catch! Thanks. The Copy should definitely go away.
4727ad0 to
2407abb
Compare
2407abb to
39e62ec
Compare
39e62ec to
741a302
Compare
Makes it impossible to create instances from outside the library. Allows future modifications to the error struct without breaking the API
741a302 to
079cfff
Compare
Owner
Author
|
I have second thoughts on this. Makes code using the library just slightly more cumbersome to write and read. This also makes the error type different compared to The benefits this brings are only hypothetical. I cannot come up with any actual reason why we would want to make breaking changes to the |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Makes it impossible to create instances from outside the library. Allows future modifications to the error struct without breaking the API. This PR however, is breaking the API and will require the next release to be at least
0.2.0after being merged.