swf: Don't error if both libflate and flate2 features are enabled
Fixes errors I was getting from rust-analyzer checking with all features enabled.
This commit is contained in:
parent
b59140ee01
commit
deef891c30
|
@ -133,7 +133,7 @@ fn make_zlib_reader<'a, R: Read + 'a>(input: R) -> Result<Box<dyn Read + 'a>> {
|
|||
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<Box<dyn Read + 'a>> {
|
||||
use libflate::zlib::Decoder;
|
||||
let decoder = Decoder::new(input)?;
|
||||
|
|
|
@ -88,7 +88,7 @@ fn write_zlib_swf<W: Write>(mut output: W, swf_body: &[u8]) -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "libflate")]
|
||||
#[cfg(all(feature = "libflate", not(feature = "flate2")))]
|
||||
fn write_zlib_swf<W: Write>(mut output: W, swf_body: &[u8]) -> Result<()> {
|
||||
use libflate::zlib::Encoder;
|
||||
let mut encoder = Encoder::new(&mut output)?;
|
||||
|
|
Loading…
Reference in New Issue