Skip to content

Commit

Permalink
doc: make docs.rs show features
Browse files Browse the repository at this point in the history
Features of the crate aren’t shown in the generated doc. Add a cargo
feature to trigger the right nightly option to do that.
  • Loading branch information
cljoly committed Dec 10, 2023
1 parent 80c1833 commit f4c1c50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rusqlite_migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ homepage = "https://cj.rs/rusqlite_migration"
repository = "https://github.com/cljoly/rusqlite_migration"
rust-version = "1.70"

# Locally, run:
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
[package.metadata.docs.rs]
# Document all features
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = []
### Enable support for async migrations with the use of `tokio-rusqlite`
Expand Down Expand Up @@ -40,8 +47,8 @@ anyhow = "1"
lazy_static = "1.4.0"
mktemp = "0.5"
criterion = { version = "0.5", features = [
"html_reports",
"cargo_bench_support",
"html_reports",
"cargo_bench_support",
] }
iai = "0.1"
insta = "1.34.0"
Expand Down
1 change: 1 addition & 0 deletions rusqlite_migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License.
*/

#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![forbid(unsafe_code)]
#![warn(missing_docs)]
// The doc is extracted from the README.md file at build time
Expand Down

0 comments on commit f4c1c50

Please sign in to comment.