From 5515d880560357426cf8a4df8350314848e44155 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:12:30 -0600 Subject: [PATCH 1/7] enable docs attribute --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index dd5a00d..7fbcdcf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(async_fn_in_trait)] #![warn(future_incompatible, unreachable_pub)] #![forbid(unsafe_code)] From d8595386e07e645c641994c16575880678e10cc0 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:13:54 -0600 Subject: [PATCH 2/7] set version 0.5.3 --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 13aa7b1..d882b27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.5.2" +version = "0.5.3" edition = "2021" license = "MIT OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception" repository = "https://github.com/yoshuawuyts/wstd" @@ -82,7 +82,7 @@ wasmtime = "26" wasmtime-wasi = "26" wasmtime-wasi-http = "26" wstd = { path = "." } -wstd-macro = { path = "macro", version = "=0.5.2" } +wstd-macro = { path = "macro", version = "=0.5.3" } [package.metadata.docs.rs] targets = [ From 3248e833b9d3a80331a4ff8324399e7959d5b5cb Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:20:12 -0600 Subject: [PATCH 3/7] added docs config to Cargo.toml --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d882b27..22a4419 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -85,6 +85,8 @@ wstd = { path = "." } wstd-macro = { path = "macro", version = "=0.5.3" } [package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] targets = [ "wasm32-wasip2" ] From 59ac79c31d9caa26dd03a95ab9416db426c82f49 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:41:04 -0600 Subject: [PATCH 4/7] removed rustdoc-args from Cargo.toml --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 22a4419..762ece3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,7 +86,6 @@ wstd-macro = { path = "macro", version = "=0.5.3" } [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs"] targets = [ "wasm32-wasip2" ] From 041d4021b0c9ef65cbac6344fc948a662dbf27a6 Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:43:56 -0600 Subject: [PATCH 5/7] revised attribute --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 7fbcdcf..cffde2e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(docsrs, feature(doc_cfg))] +#![feature(doc_cfg)] #![allow(async_fn_in_trait)] #![warn(future_incompatible, unreachable_pub)] #![forbid(unsafe_code)] From 0ffac34392055bdb64f9b01b433a9a04e37b7b6d Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:46:17 -0600 Subject: [PATCH 6/7] Revert "revised attribute" This reverts commit 041d4021b0c9ef65cbac6344fc948a662dbf27a6. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index cffde2e..7fbcdcf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(doc_cfg)] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(async_fn_in_trait)] #![warn(future_incompatible, unreachable_pub)] #![forbid(unsafe_code)] From fb5e308af42aa7e25df787a1498c1004fdcc2c1c Mon Sep 17 00:00:00 2001 From: Calvin Prewitt Date: Wed, 19 Feb 2025 11:51:06 -0600 Subject: [PATCH 7/7] revised --- src/http/body.rs | 1 - src/http/request.rs | 1 - src/lib.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/src/http/body.rs b/src/http/body.rs index 3671c22..074b4fe 100644 --- a/src/http/body.rs +++ b/src/http/body.rs @@ -189,7 +189,6 @@ impl IncomingBody { /// /// [`serde_json::from_reader`]: https://docs.serde.rs/serde_json/fn.from_reader.html #[cfg(feature = "json")] - #[cfg_attr(docsrs, doc(cfg(feature = "json")))] pub async fn json(&mut self) -> Result { let buf = self.bytes().await?; serde_json::from_slice(&buf).map_err(|e| ErrorVariant::Other(e.to_string()).into()) diff --git a/src/http/request.rs b/src/http/request.rs index f5e38ec..92a1129 100644 --- a/src/http/request.rs +++ b/src/http/request.rs @@ -36,7 +36,6 @@ impl JsonRequest for Builder { /// Serialization can fail if `T`'s implementation of `Serialize` decides to /// fail. #[cfg(feature = "json")] - #[cfg_attr(docsrs, doc(cfg(feature = "json")))] fn json(self, json: &T) -> Result>>, Error> { let encoded = serde_json::to_vec(json).map_err(|e| ErrorVariant::Other(e.to_string()))?; let builder = if !self diff --git a/src/lib.rs b/src/lib.rs index 7fbcdcf..dd5a00d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(async_fn_in_trait)] #![warn(future_incompatible, unreachable_pub)] #![forbid(unsafe_code)]