Skip to content

Commit

Permalink
docs: Add package.metadata.docs.rs
Browse files Browse the repository at this point in the history
This is to enable `doc_auto_cfg` feature with Docs.rs.
  • Loading branch information
sorairolake committed May 18, 2024
1 parent aa56c0a commit 62788e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ edition = "2021"
exclude = ["tests/**", "examples/**", ".github/**", "fuzz/**"]
build = "src/build.rs"

[package.metadata.docs.rs]
features = [
"aes-crypto",
"bzip2",
"chrono",
"deflate",
"deflate64",
"deflate-zlib-ng",
"lzma",
"time",
"zstd",
]
# Can be enabled when <https://github.com/zopfli-rs/zopfli/issues/42> is fixed
# all-features = true
no-default-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace.dependencies]
time = { version = "0.3.36", default-features = false }

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
//! | ZipCrypto deprecated encryption | ✅ | ✅ |
//!
//!
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![warn(missing_docs)]
#![allow(unexpected_cfgs)] // Needed for cfg(fuzzing) on nightly as of 2024-05-06
pub use crate::compression::{CompressionMethod, SUPPORTED_COMPRESSION_METHODS};
Expand Down

0 comments on commit 62788e2

Please sign in to comment.