Skip to content

Conversation

@faern
Copy link
Owner

@faern faern commented Feb 2, 2025

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.0 after being merged.

@faern faern mentioned this pull request Feb 2, 2025
@faern faern added this to the Release 1.0 milestone Feb 2, 2025
src/errors.rs Outdated
/// The receive operation can only fail if the corresponding [`Sender`](crate::Sender) was dropped
/// 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)]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe consider removing Copy too? Otherwise it'd be harder to expand with containing e.g. a String.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks. The Copy should definitely go away.

Makes it impossible to create instances from outside the library. Allows
future modifications to the error struct without breaking the API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants