@@ -246,12 +246,12 @@ impl Client {
246
246
}
247
247
}
248
248
249
- fn insert ( & mut self , ct : ClientTransaction ) -> Result < ( ) > {
249
+ fn insert ( & self , ct : ClientTransaction ) -> Result < ( ) > {
250
250
if self . settings . closed {
251
251
return Err ( Error :: ErrClientClosed ) ;
252
252
}
253
253
254
- if let Some ( handler_tx) = & mut self . handler_tx {
254
+ if let Some ( handler_tx) = & self . handler_tx {
255
255
handler_tx. send ( Event {
256
256
event_type : EventType :: Insert ( ct) ,
257
257
..Default :: default ( )
@@ -261,12 +261,12 @@ impl Client {
261
261
Ok ( ( ) )
262
262
}
263
263
264
- fn remove ( & mut self , id : TransactionId ) -> Result < ( ) > {
264
+ fn remove ( & self , id : TransactionId ) -> Result < ( ) > {
265
265
if self . settings . closed {
266
266
return Err ( Error :: ErrClientClosed ) ;
267
267
}
268
268
269
- if let Some ( handler_tx) = & mut self . handler_tx {
269
+ if let Some ( handler_tx) = & self . handler_tx {
270
270
handler_tx. send ( Event {
271
271
event_type : EventType :: Remove ( id) ,
272
272
..Default :: default ( )
@@ -426,7 +426,7 @@ impl Client {
426
426
Ok ( self )
427
427
}
428
428
429
- pub async fn send ( & mut self , m : & Message , handler : Handler ) -> Result < ( ) > {
429
+ pub async fn send ( & self , m : & Message , handler : Handler ) -> Result < ( ) > {
430
430
if self . settings . closed {
431
431
return Err ( Error :: ErrClientClosed ) ;
432
432
}
@@ -446,7 +446,7 @@ impl Client {
446
446
let d = t. next_timeout ( t. start ) ;
447
447
self . insert ( t) ?;
448
448
449
- if let Some ( client_agent_tx) = & mut self . client_agent_tx {
449
+ if let Some ( client_agent_tx) = & self . client_agent_tx {
450
450
client_agent_tx
451
451
. send ( ClientAgent :: Start ( m. transaction_id , d) )
452
452
. await ?;
@@ -458,7 +458,7 @@ impl Client {
458
458
if result. is_err ( ) && has_handler {
459
459
self . remove ( m. transaction_id ) ?;
460
460
461
- if let Some ( client_agent_tx) = & mut self . client_agent_tx {
461
+ if let Some ( client_agent_tx) = & self . client_agent_tx {
462
462
client_agent_tx
463
463
. send ( ClientAgent :: Stop ( m. transaction_id ) )
464
464
. await ?;
0 commit comments