Loading CHANGELOG.next.toml +13 −1 Original line number Diff line number Diff line Loading @@ -10,3 +10,15 @@ # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"} # author = "rcoh" [[aws-sdk-rust]] message = "The outputs for event stream operations (for example, S3's SelectObjectContent) now implement the `Sync` auto-trait." references = ["smithy-rs#2496"] meta = { "breaking" = false, "tada" = false, "bug" = true } author = "jdisanti" [[smithy-rs]] message = "The outputs for event stream operations now implement the `Sync` auto-trait." references = ["smithy-rs#2496"] meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "all"} author = "jdisanti" rust-runtime/aws-smithy-http/src/event_stream/receiver.rs +5 −5 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ impl StdError for ReceiverError {} /// Receives Smithy-modeled messages out of an Event Stream. #[derive(Debug)] pub struct Receiver<T, E> { unmarshaller: Box<dyn UnmarshallMessage<Output = T, Error = E> + Send>, unmarshaller: Box<dyn UnmarshallMessage<Output = T, Error = E> + Send + Sync>, decoder: MessageFrameDecoder, buffer: RecvBuf, body: SdkBody, Loading @@ -143,7 +143,7 @@ pub struct Receiver<T, E> { impl<T, E> Receiver<T, E> { /// Creates a new `Receiver` with the given message unmarshaller and SDK body. pub fn new( unmarshaller: impl UnmarshallMessage<Output = T, Error = E> + Send + 'static, unmarshaller: impl UnmarshallMessage<Output = T, Error = E> + Send + Sync + 'static, body: SdkBody, ) -> Self { Receiver { Loading Loading @@ -548,10 +548,10 @@ mod tests { ); } fn assert_send<T: Send>() {} fn assert_send_and_sync<T: Send + Sync>() {} #[tokio::test] async fn receiver_is_send() { assert_send::<Receiver<(), ()>>(); async fn receiver_is_send_and_sync() { assert_send_and_sync::<Receiver<(), ()>>(); } } Loading
CHANGELOG.next.toml +13 −1 Original line number Diff line number Diff line Loading @@ -10,3 +10,15 @@ # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"} # author = "rcoh" [[aws-sdk-rust]] message = "The outputs for event stream operations (for example, S3's SelectObjectContent) now implement the `Sync` auto-trait." references = ["smithy-rs#2496"] meta = { "breaking" = false, "tada" = false, "bug" = true } author = "jdisanti" [[smithy-rs]] message = "The outputs for event stream operations now implement the `Sync` auto-trait." references = ["smithy-rs#2496"] meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "all"} author = "jdisanti"
rust-runtime/aws-smithy-http/src/event_stream/receiver.rs +5 −5 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ impl StdError for ReceiverError {} /// Receives Smithy-modeled messages out of an Event Stream. #[derive(Debug)] pub struct Receiver<T, E> { unmarshaller: Box<dyn UnmarshallMessage<Output = T, Error = E> + Send>, unmarshaller: Box<dyn UnmarshallMessage<Output = T, Error = E> + Send + Sync>, decoder: MessageFrameDecoder, buffer: RecvBuf, body: SdkBody, Loading @@ -143,7 +143,7 @@ pub struct Receiver<T, E> { impl<T, E> Receiver<T, E> { /// Creates a new `Receiver` with the given message unmarshaller and SDK body. pub fn new( unmarshaller: impl UnmarshallMessage<Output = T, Error = E> + Send + 'static, unmarshaller: impl UnmarshallMessage<Output = T, Error = E> + Send + Sync + 'static, body: SdkBody, ) -> Self { Receiver { Loading Loading @@ -548,10 +548,10 @@ mod tests { ); } fn assert_send<T: Send>() {} fn assert_send_and_sync<T: Send + Sync>() {} #[tokio::test] async fn receiver_is_send() { assert_send::<Receiver<(), ()>>(); async fn receiver_is_send_and_sync() { assert_send_and_sync::<Receiver<(), ()>>(); } }