Skip to content

Commit

Permalink
document-features support for git-index and git-worktree (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Feb 27, 2022
1 parent ecd2e5e commit f53c395
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions git-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,11 @@ smallvec = "1.7.0"
atoi = "1.0.0"
bitflags = "1.3.2"

document-features = { version = "0.2.0", optional = true }

[dev-dependencies]
git-testtools = { path = "../tests/tools"}

[package.metadata.docs.rs]
features = ["document-features", "serde1"]

5 changes: 5 additions & 0 deletions git-index/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![deny(unsafe_code, missing_docs, rust_2018_idioms)]
#![allow(missing_docs)]

Expand Down
3 changes: 1 addition & 2 deletions git-worktree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ walkdir = "2.3.2"
tempfile = "3.2.0"

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
features = ["document-features", "serde1"]
5 changes: 5 additions & 0 deletions git-worktree/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![forbid(unsafe_code, rust_2018_idioms)]

/// file system related utilities
Expand Down

0 comments on commit f53c395

Please sign in to comment.