Skip to content

Commit

Permalink
feat: keep feature documentation inline with manifests (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Feb 6, 2022
1 parent 8e434d8 commit f99851b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions cargo-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ The library powering the command-line interface.

### git-actor

* **local-time-support**
- Make `Signature` initializers using the local time (with UTC offset) available.
Documented in [its documnetation](https://docs.rs/git-actor).

### git-features

Expand Down
11 changes: 8 additions & 3 deletions git-actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ doctest = false

[features]
serde1 = ["serde", "bstr/serde1"]
local-time-support = ["git-features/time"]

[package.metadata.docs.rs]
all-features = true
## Make `Signature` initializers use the local time (with UTC offset) available.
local-time-support = ["git-features/time"]

[dependencies]
git-features = { version = "^0.19.1", path = "../git-features", optional = true }
Expand All @@ -27,6 +26,12 @@ nom = { version = "7", default-features = false, features = ["std"]}
itoa = "1.0.1"
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]}

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

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

[package.metadata.docs.rs]
features = ["document-features"]
all-features = true
6 changes: 6 additions & 0 deletions git-actor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
//! This crate provides ways of identifying an actor within the git repository both in shared/mutable and mutable variants.
//!
//! ## Feature Flags
#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![forbid(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]
use bstr::{BStr, BString};
Expand Down

0 comments on commit f99851b

Please sign in to comment.