Skip to content

Commit 430212e

Browse files
committed
chore: add docs.rs metadata to Cargo.toml and use doc_cfg
We use the nightly [`doc_cfg`](https://doc.rust-lang.org/unstable-book/language-features/doc-cfg.html) feature to automatically annotate modules as only available with specific feature flags enabled in the docs. This requires some metadata in Cargo.toml that was missing.
1 parent 2728d73 commit 430212e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ categories = ["embedded", "encoding", "no-std::no-alloc", "parsing"]
1212
keywords = ["device-tree", "fdt", "dtb", "dts", "parser"]
1313
readme = "README.md"
1414

15+
[package.metadata.docs.rs]
16+
all-features = true
17+
rustdoc-args = ["--cfg", "docsrs"]
18+
1519
[features]
1620
default = []
1721
write = ["dep:indexmap", "dep:twox-hash"]

0 commit comments

Comments
 (0)