File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ pub enum InitResult<G: GenServer> {
135135}
136136
137137pub trait GenServer : Send + Sized {
138- type CallMsg : Send + Sized + Sync ;
139- type CastMsg : Send + Sized + Sync ;
138+ type CallMsg : Send + Sized ;
139+ type CastMsg : Send + Sized ;
140140 type OutMsg : Send + Sized ;
141141 type Error : Debug + Send ;
142142
Original file line number Diff line number Diff line change 6262 let genserver_cancel_fut = pin ! ( gen_server_cancellation_token. cancelled( ) ) ;
6363 let cancel_conditions = select ( cancel_token_fut, genserver_cancel_fut) ;
6464
65- let async_block = pin ! ( async {
65+ let message_clone = message. clone ( ) ;
66+ let handle_reference = & mut handle;
67+ let async_block = pin ! ( async move {
6668 rt:: sleep( period) . await ;
67- let _ = handle . cast( message . clone ( ) ) . await ;
69+ let _ = handle_reference . cast( message_clone ) . await ;
6870 } ) ;
6971 let result = select ( cancel_conditions, async_block) . await ;
7072 match result {
You can’t perform that action at this time.
0 commit comments