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 on the GzDecoder #255

Open
Kerollmops opened this issue Oct 25, 2020 · 2 comments
Open

Implement Clone on the GzDecoder #255

Kerollmops opened this issue Oct 25, 2020 · 2 comments

Comments

@Kerollmops
Copy link

Kerollmops commented Oct 25, 2020

Hello,

I was wondering if there were a specific reason for the GzDecoder to not implement Clone when the R type implements Clone too.
It doesn't seem to contain complex or unclonable items in it.

Is it just because no one thought about implementing it?
Or to be sure to keep the lib compatible with potential futur versions of the lib?

@Kerollmops Kerollmops changed the title Implement clone on the GzDecoder Implement Clone on the GzDecoder Oct 25, 2020
@Kerollmops
Copy link
Author

Kerollmops commented Oct 25, 2020

So I dived into limbo of the crate and apparently the miniz_oxide::core::CompressorOxide doesn't implement Clone and this is the struct that is used by GzDecoder when using the Rust feature flag (I didn't even dive for when the flag is not Rust and the lib use C instead).

@alexcrichton
Copy link
Member

I think it'd be great to implement Clone! I'm not entirely sure if the libz library has support for this, however, so we'd need to make sure all the backends support it.

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

No branches or pull requests

2 participants