diff --git a/src/chat/chat_stream.rs b/src/chat/chat_stream.rs index 740b81d..e0be127 100644 --- a/src/chat/chat_stream.rs +++ b/src/chat/chat_stream.rs @@ -5,7 +5,7 @@ use futures::Stream; use std::pin::Pin; use std::task::{Context, Poll}; -type InterStreamType = Pin>>>; +type InterStreamType = Pin> + Send>>; /// ChatStream is a Rust Future Stream that iterates through the events of a chat stream request. pub struct ChatStream { @@ -19,7 +19,7 @@ impl ChatStream { pub fn from_inter_stream(inter_stream: T) -> Self where - T: Stream> + Unpin + 'static, + T: Stream> + Send + Unpin + 'static, { let boxed_stream: InterStreamType = Box::pin(inter_stream); ChatStream::new(boxed_stream) diff --git a/src/webc/web_stream.rs b/src/webc/web_stream.rs index 7f48fe8..1fc288a 100644 --- a/src/webc/web_stream.rs +++ b/src/webc/web_stream.rs @@ -17,8 +17,8 @@ use std::task::{Context, Poll}; pub struct WebStream { stream_mode: StreamMode, reqwest_builder: Option, - response_future: Option>>>>>, - bytes_stream: Option>>>>>, + response_future: Option>> + Send>>>, + bytes_stream: Option>> + Send>>>, // If a poll was a partial message, so we kept the previous part partial_message: Option, // If a poll retrieved multiple messages, we keep to be sent in next poll