Closed
Description
If you try to enable both the zlib-rs and cloudflare_zlib features:
[dependencies]
flate2 = { version = "1.0.35", features = ["zlib-rs", "cloudflare_zlib"] }
Then there are some compile errors:
error[E0252]: the name `libz` is defined multiple times
--> /home/jonathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flate2-1.0.35/src/ffi/c.rs:412:9
|
409 | use libz_rs_sys as libz;
| ------------------- previous import of the module `libz` here
...
412 | use cloudflare_zlib_sys as libz;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `libz` reimported here
|
= note: `libz` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
412 | use cloudflare_zlib_sys as other_libz;
| ~~~~~~~~~~~~~
...
I believe this is can be fixed by establishing precedence between the two flags here:
Lines 408 to 412 in 14aec22