fix: show docs.rs feature flags

This commit is contained in:
ThetaDev 2024-08-18 03:25:02 +02:00
parent ec13cbb1f3
commit 67a231d6d1
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
4 changed files with 16 additions and 2 deletions

View file

@ -120,3 +120,9 @@ tokio-test.workspace = true
insta.workspace = true
path_macro.workspace = true
tracing-test.workspace = true
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features rss --no-deps --open
features = ["rss"]
rustdoc-args = ["--cfg", "docsrs"]

View file

@ -54,3 +54,9 @@ path_macro.workspace = true
rstest.workspace = true
serde_json.workspace = true
temp_testdir = "0.2.3"
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features indicatif,audiotag --no-deps --open
features = ["indicatif", "audiotag"]
rustdoc-args = ["--cfg", "docsrs"]

View file

@ -1,4 +1,5 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs, clippy::todo, clippy::dbg_macro)]
mod error;
@ -354,7 +355,7 @@ impl DownloaderBuilder {
self
}
/// Set the [`VideoFormat`] of downloaded videos
/// Set the [`DownloadVideoFormat`] of downloaded videos
#[must_use]
pub fn video_format(mut self, video_format: DownloadVideoFormat) -> Self {
self.video_format = video_format;
@ -627,7 +628,7 @@ impl DownloadQuery {
self
}
/// Set the [`VideoFormat`] of downloaded videos
/// Set the [`DownloadVideoFormat`] of downloaded videos
#[must_use]
pub fn video_format(mut self, video_format: DownloadVideoFormat) -> Self {
self.video_format = Some(video_format);

View file

@ -1,4 +1,5 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![forbid(unsafe_code)]
#![warn(missing_docs, clippy::todo, clippy::dbg_macro)]