Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Clone for CompressError and DecompressError #445

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

mkrasnitski
Copy link
Contributor

When making my own error types, one of my variants wraps a flate2::DecompressError, and that prevents me from deriving Clone on my error type without creating a mirror implementation and transforming between the flate2 type and my copy of it. These two error types are cheap to clone and Status already derives Clone, too.

I didn't add a Copy derive because the ErrorMessage struct might be changed to contain a string in the future, which would break the Copy implementation.

@mkrasnitski
Copy link
Contributor Author

Seems like the cloudflare_zlib feature is broken unrelated to my changes.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot, I'd also think that doing this should only be helpful downstream, and not cause any complications.

CI break spontaneously not too long ago, and it's still unclear what's even causing this. Time to reproduce this locally I presume, but no need to block this PR on it.

@Byron Byron merged commit 15e261a into rust-lang:main Jan 25, 2025
9 of 14 checks passed
@mkrasnitski mkrasnitski deleted the clone-error branch January 25, 2025 21:33
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.

2 participants