Skip to content

Commit 8bbdf9b

Browse files
authored
Merge pull request #246 from H1rono/doc_cfg
🔧 Configure `doc_cfg` for docs.rs
2 parents 4725533 + 6068156 commit 8bbdf9b

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

.cspell-dict/lib-words.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ chrono
66
eprintln
77
serde
88
combinators
9+
docsrs
910

1011
HTAB
1112
VCHAR

.cspell-dict/tool-words.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
rustup
22
rustc
33
rustfmt
4+
rustdoc
45
clippy
56
MSRV
67
RUSTFLAGS

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ include = ["/src", "/examples", "/README.md", "/LICENSE"]
2020

2121
[package.metadata.docs.rs]
2222
features = ["tower"]
23+
rustdoc-args = ["--cfg", "docsrs"]
2324

2425
[dependencies]
2526
serde = { version = "1.0", features = ["derive"] }

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
2+
13
//! [![GitHub](https://img.shields.io/github/license/H1rono/traq-bot-http-rs?style=for-the-badge&logo=github)](https://github.com/H1rono/traq-bot-http-rs/blob/main/LICENSE)
24
//! [![Crates.io](https://img.shields.io/crates/l/traq-bot-http?style=for-the-badge&logo=docsdotrs)](https://crates.io/crates/traq-bot-http)
35
//! [![GitHub release](https://img.shields.io/github/v/release/H1rono/traq-bot-http-rs?style=for-the-badge&logo=github)](https://github.com/H1rono/traq-bot-http-rs/releases/latest)

0 commit comments

Comments
 (0)