Skip to content

Commit c427e34

Browse files
committed
fix: tests
1 parent 2f11d14 commit c427e34

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/engineioxide/src/engine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ mod tests {
115115
println!("socket disconnect {} {:?}", socket.id, reason);
116116
}
117117

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>>) {
119119
println!("Ping pong message {:?}", msg);
120120
socket.emit(msg).ok();
121121
}
122122

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>>) {
124124
println!("Ping pong binary message {:?}", data);
125125
socket.emit_binary(data).ok();
126126
}

crates/engineioxide/tests/disconnect_reason.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ impl EngineIoHandler for MyHandler {
3939
self.disconnect_tx.try_send(reason).unwrap();
4040
}
4141

42-
fn on_message(&self, msg: Str, socket: Arc<Socket<()>>) {
42+
fn on_message(self: &Arc<Self>, msg: Str, socket: Arc<Socket<()>>) {
4343
println!("Ping pong message {:?}", msg);
4444
socket.emit(msg).ok();
4545
}
4646

47-
fn on_binary(&self, data: Bytes, socket: Arc<Socket<()>>) {
47+
fn on_binary(self: &Arc<Self>, data: Bytes, socket: Arc<Socket<()>>) {
4848
println!("Ping pong binary message {:?}", data);
4949
socket.emit_binary(data).ok();
5050
}

0 commit comments

Comments
 (0)