Skip to content

Commit

Permalink
remove Send bound from WASM
Browse files Browse the repository at this point in the history
  • Loading branch information
analogrelay authored Sep 19, 2024
1 parent a428636 commit 0391de1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/typespec/typespec_client_core/src/http/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ pub trait Model: Sized {
/// The server may still be sending data, so it's up to implementors whether they want to wait for the entire body to be received or not.
/// 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<Output = crate::Result<Self>> + Send;

#[cfg(target_arch = "wasm32")]
fn from_response_body(body: ResponseBody) -> impl Future<Output = crate::Result<Self>>;
}

/// An HTTP response.
Expand Down

0 comments on commit 0391de1

Please sign in to comment.