From 7223f81afb9b8567991a024a2790e3582230d49c Mon Sep 17 00:00:00 2001 From: Ashley Stanton-Nurse Date: Thu, 19 Sep 2024 20:20:43 +0000 Subject: [PATCH] Add 'Sync' bound to from_response_body, but exclude bounds from wasm32 --- sdk/typespec/typespec_client_core/src/http/response.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/typespec/typespec_client_core/src/http/response.rs b/sdk/typespec/typespec_client_core/src/http/response.rs index db2dbcfc90..e715a51681 100644 --- a/sdk/typespec/typespec_client_core/src/http/response.rs +++ b/sdk/typespec/typespec_client_core/src/http/response.rs @@ -26,7 +26,9 @@ pub trait Model: Sized { /// For example, a type representing a simple REST API response will want to wait for the entire body to be received and then parse the body. /// However, a type representing the download of a large file, may not want to do that and instead prepare to stream the body to a file or other destination. #[cfg(not(target_arch = "wasm32"))] - fn from_response_body(body: ResponseBody) -> impl Future> + Send; + fn from_response_body( + body: ResponseBody, + ) -> impl Future> + Send + Sync; #[cfg(target_arch = "wasm32")] fn from_response_body(body: ResponseBody) -> impl Future>;