Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Scope futures returned by wasip3 http implementations (#14220)

Alex Crichton1991962d51c0
diff --git a/crates/wasi-http/src/p3/request.rs b/crates/wasi-http/src/p3/request.rs
index 440d81b28e..11b5dde76d 100644
--- a/crates/wasi-http/src/p3/request.rs
+++ b/crates/wasi-http/src/p3/request.rs
@@ -89,7 +89,7 @@ impl Request {
req: http::Request<T>,
) -> (
Self,
- impl Future<Output = Result<(), Error>> + Send + 'static,
+ impl Future<Output = Result<(), Error>> + Send + 'static + use<T>,
)
where
T: http_body::Body<Data = Bytes> + Send + 'static,
diff --git a/crates/wasi-http/src/p3/response.rs b/crates/wasi-http/src/p3/response.rs
index f4ad8dc446..7b41974f0c 100644
--- a/crates/wasi-http/src/p3/response.rs
+++ b/crates/wasi-http/src/p3/response.rs
@@ -94,7 +94,7 @@ impl Response {
res: http::Response<T>,
) -> (
Self,
- impl Future<Output = Result<(), Error>> + Send + 'static,
+ impl Future<Output = Result<(), Error>> + Send + 'static + use<T>,
)
where
T: http_body::Body<Data = Bytes> + Send + 'static,