Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions concurrency/src/tasks/gen_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ pub trait GenServer
where
Self: Send + Sized,
{
type CallMsg: Send + Sized + Sync;
type CastMsg: Send + Sized + Sync;
type CallMsg: Clone + Send + Sized + Sync;
type CastMsg: Clone + Send + Sized + Sync;
type OutMsg: Send + Sized;
type State: Clone + Send;
type Error: Debug + Send;
Expand Down
3 changes: 1 addition & 2 deletions concurrency/src/tasks/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ where
Box::pin(cloned_token.cancelled()),
Box::pin(async {
rt::sleep(period).await;
let _ = handle.cast(message).await;
let _ = handle.cast(message.clone()).await;
}),
)
.await;
Expand All @@ -46,7 +46,6 @@ pub fn send_interval<T>(
) -> TimerHandle
where
T: GenServer + 'static,
T::CastMsg: Clone,
{
let cancellation_token = CancellationToken::new();
let cloned_token = cancellation_token.clone();
Expand Down
4 changes: 2 additions & 2 deletions concurrency/src/threads/gen_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ pub trait GenServer
where
Self: Send + Sized,
{
type CallMsg: Send + Sized;
type CastMsg: Send + Sized;
type CallMsg: Clone + Send + Sized;
type CastMsg: Clone + Send + Sized;
type OutMsg: Send + Sized;
type State: Clone + Send;
type Error: Debug;
Expand Down
1 change: 0 additions & 1 deletion concurrency/src/threads/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pub fn send_interval<T>(
) -> TimerHandle
where
T: GenServer + 'static,
T::CastMsg: Clone,
{
let cancellation_token = CancellationToken::new();
let mut cloned_token = cancellation_token.clone();
Expand Down