Skip to content

Commit

Permalink
Merge pull request #336 from wcampbell0x2a/add-docs-cfg-all-features
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Feb 9, 2023
2 parents a9000e1 + f862ed1 commit e094dad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ zlib-ng = ["any_zlib", "libz-ng-sys"]
cloudflare_zlib = ["any_zlib", "cloudflare-zlib-sys"]
rust_backend = ["miniz_oxide"]
miniz-sys = ["rust_backend"] # For backwards compatibility

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#![deny(missing_debug_implementations)]
#![allow(trivial_numeric_casts)]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

pub use crate::crc::{Crc, CrcReader, CrcWriter};
pub use crate::gz::GzBuilder;
Expand Down
20 changes: 0 additions & 20 deletions src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,6 @@ impl Compress {
///
/// If `window_bits` does not fall into the range 9 ..= 15,
/// `new_with_window_bits` will panic.
///
/// # Note
///
/// This constructor is only available when the `zlib` feature is used.
/// Other backends currently do not support custom window bits.
#[cfg(feature = "any_zlib")]
pub fn new_with_window_bits(
level: Compression,
Expand Down Expand Up @@ -243,11 +238,6 @@ impl Compress {
///
/// If `window_bits` does not fall into the range 9 ..= 15,
/// `new_with_window_bits` will panic.
///
/// # Note
///
/// This constructor is only available when the `zlib` feature is used.
/// Other backends currently do not support gzip headers for Compress.
#[cfg(feature = "any_zlib")]
pub fn new_gzip(level: Compression, window_bits: u8) -> Compress {
assert!(
Expand Down Expand Up @@ -389,11 +379,6 @@ impl Decompress {
///
/// If `window_bits` does not fall into the range 9 ..= 15,
/// `new_with_window_bits` will panic.
///
/// # Note
///
/// This constructor is only available when the `zlib` feature is used.
/// Other backends currently do not support custom window bits.
#[cfg(feature = "any_zlib")]
pub fn new_with_window_bits(zlib_header: bool, window_bits: u8) -> Decompress {
assert!(
Expand All @@ -414,11 +399,6 @@ impl Decompress {
///
/// If `window_bits` does not fall into the range 9 ..= 15,
/// `new_with_window_bits` will panic.
///
/// # Note
///
/// This constructor is only available when the `zlib` feature is used.
/// Other backends currently do not support gzip headers for Decompress.
#[cfg(feature = "any_zlib")]
pub fn new_gzip(window_bits: u8) -> Decompress {
assert!(
Expand Down

0 comments on commit e094dad

Please sign in to comment.