File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -115,12 +115,12 @@ mod tests {
115
115
println ! ( "socket disconnect {} {:?}" , socket. id, reason) ;
116
116
}
117
117
118
- fn on_message ( & self , msg : Str , socket : Arc < Socket < Self :: Data > > ) {
118
+ fn on_message ( self : & Arc < Self > , msg : Str , socket : Arc < Socket < Self :: Data > > ) {
119
119
println ! ( "Ping pong message {:?}" , msg) ;
120
120
socket. emit ( msg) . ok ( ) ;
121
121
}
122
122
123
- fn on_binary ( & self , data : Bytes , socket : Arc < Socket < Self :: Data > > ) {
123
+ fn on_binary ( self : & Arc < Self > , data : Bytes , socket : Arc < Socket < Self :: Data > > ) {
124
124
println ! ( "Ping pong binary message {:?}" , data) ;
125
125
socket. emit_binary ( data) . ok ( ) ;
126
126
}
Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ impl EngineIoHandler for MyHandler {
39
39
self . disconnect_tx . try_send ( reason) . unwrap ( ) ;
40
40
}
41
41
42
- fn on_message ( & self , msg : Str , socket : Arc < Socket < ( ) > > ) {
42
+ fn on_message ( self : & Arc < Self > , msg : Str , socket : Arc < Socket < ( ) > > ) {
43
43
println ! ( "Ping pong message {:?}" , msg) ;
44
44
socket. emit ( msg) . ok ( ) ;
45
45
}
46
46
47
- fn on_binary ( & self , data : Bytes , socket : Arc < Socket < ( ) > > ) {
47
+ fn on_binary ( self : & Arc < Self > , data : Bytes , socket : Arc < Socket < ( ) > > ) {
48
48
println ! ( "Ping pong binary message {:?}" , data) ;
49
49
socket. emit_binary ( data) . ok ( ) ;
50
50
}
You can’t perform that action at this time.
0 commit comments