Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "flate2"
authors = ["Alex Crichton <alex@alexcrichton.com>", "Josh Triplett <josh@joshtriplett.org>"]
version = "1.1.6"
version = "1.1.7"
edition = "2018"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
22 changes: 20 additions & 2 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,34 @@ mod c;
#[cfg(feature = "any_zlib")]
pub use self::c::*;

// Prefer zlib-rs when both Rust backends are enabled to avoid duplicate exports.
#[cfg(all(not(feature = "any_zlib"), feature = "zlib-rs"))]
mod zlib_rs;
#[cfg(all(not(feature = "any_zlib"), feature = "zlib-rs"))]
pub use self::zlib_rs::*;

#[cfg(all(not(feature = "any_zlib"), feature = "miniz_oxide"))]
// Fallback to miniz_oxide when zlib-rs is not selected.
#[cfg(all(
not(feature = "any_zlib"),
not(feature = "zlib-rs"),
feature = "miniz_oxide"
))]
mod miniz_oxide;
#[cfg(all(not(feature = "any_zlib"), feature = "miniz_oxide"))]
#[cfg(all(
not(feature = "any_zlib"),
not(feature = "zlib-rs"),
feature = "miniz_oxide"
))]
pub use self::miniz_oxide::*;

// If no backend is enabled, fail fast with a clear error message.
#[cfg(all(
not(feature = "any_zlib"),
not(feature = "zlib-rs"),
not(feature = "miniz_oxide")
))]
compile_error!("No compression backend selected; enable one of `zlib`, `zlib-ng`, `zlib-rs`, or the default `rust_backend` feature.");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This branch added for better UE, I'm open to just remove it.


impl std::fmt::Debug for ErrorMessage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.get().fmt(f)
Expand Down