From 4be9cfa5799b8701f5d4b25d210fdf39304c4689 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Tue, 21 Mar 2023 12:44:23 +1100 Subject: [PATCH 1/2] Fix building docs on docs.rs Fixed #1788 --- Cargo.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1f05fed52..d8a33b9d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,18 @@ edition = "2018" autotests = true [package.metadata.docs.rs] -all-features = true +features = [ + "blocking", + "cookies", + "json", + "multipart", + "stream", + "trust-dns", + "socks", + "gzip", + "brotli", + "deflate", +] rustdoc-args = ["--cfg", "docsrs"] targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] From 12cb5554147284d02682eefa800c49e78189c60c Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Tue, 21 Mar 2023 12:50:20 +1100 Subject: [PATCH 2/2] Pass `--cfg reqwest_unstable` to rustdoc instead of disabling `http3` feature on docs.rs Signed-off-by: Jiahao XU --- Cargo.toml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d8a33b9d0..69f5a3107 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,19 +13,8 @@ edition = "2018" autotests = true [package.metadata.docs.rs] -features = [ - "blocking", - "cookies", - "json", - "multipart", - "stream", - "trust-dns", - "socks", - "gzip", - "brotli", - "deflate", -] -rustdoc-args = ["--cfg", "docsrs"] +all-features = true +rustdoc-args = ["--cfg", "docsrs", "--cfg", "reqwest_unstable"] targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [package.metadata.playground]