diff --git a/Cargo.toml b/Cargo.toml index 597f8d0..1a026bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/downloader/Cargo.toml b/downloader/Cargo.toml index 7582dfa..a95a94b 100644 --- a/downloader/Cargo.toml +++ b/downloader/Cargo.toml @@ -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"] diff --git a/downloader/src/lib.rs b/downloader/src/lib.rs index 45cc0e4..97a51c4 100644 --- a/downloader/src/lib.rs +++ b/downloader/src/lib.rs @@ -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); diff --git a/src/lib.rs b/src/lib.rs index 6d5b355..89837ae 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)]