diff --git a/swf/src/read.rs b/swf/src/read.rs index ea3fdc3a4..3d58a73fe 100644 --- a/swf/src/read.rs +++ b/swf/src/read.rs @@ -133,7 +133,7 @@ fn make_zlib_reader<'a, R: Read + 'a>(input: R) -> Result> { Ok(Box::new(ZlibDecoder::new(input))) } -#[cfg(feature = "libflate")] +#[cfg(all(feature = "libflate", not(feature = "flate2")))] fn make_zlib_reader<'a, R: Read + 'a>(input: R) -> Result> { use libflate::zlib::Decoder; let decoder = Decoder::new(input)?; diff --git a/swf/src/write.rs b/swf/src/write.rs index 875edc7e3..bd81bfd90 100644 --- a/swf/src/write.rs +++ b/swf/src/write.rs @@ -88,7 +88,7 @@ fn write_zlib_swf(mut output: W, swf_body: &[u8]) -> Result<()> { Ok(()) } -#[cfg(feature = "libflate")] +#[cfg(all(feature = "libflate", not(feature = "flate2")))] fn write_zlib_swf(mut output: W, swf_body: &[u8]) -> Result<()> { use libflate::zlib::Encoder; let mut encoder = Encoder::new(&mut output)?;