diff options
| author | Eskil Queseth <eskilq@kth.se> | 2020-11-03 22:13:37 +0100 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2020-11-03 22:13:37 +0100 |
| commit | 4dd73f7b837572211b71483d62bbdfb1227d2aee (patch) | |
| tree | b0ae8e001e1ada802a95fd1a2fc2b59272f45f27 /mumd/src/network/tcp.rs | |
| parent | 71941137265669013ef64473748c4fde6bc48f1c (diff) | |
| parent | d6496cb0f6abba855b04338fa8bc5aaa89487c29 (diff) | |
| download | mum-4dd73f7b837572211b71483d62bbdfb1227d2aee.tar.gz | |
Merge branch 'main' into mute
Diffstat (limited to 'mumd/src/network/tcp.rs')
| -rw-r--r-- | mumd/src/network/tcp.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/network/tcp.rs b/mumd/src/network/tcp.rs index cd11690..131f066 100644 --- a/mumd/src/network/tcp.rs +++ b/mumd/src/network/tcp.rs @@ -27,7 +27,7 @@ type TcpSender = SplitSink< type TcpReceiver = SplitStream<Framed<TlsStream<TcpStream>, ControlCodec<Serverbound, Clientbound>>>; -pub(crate) type TcpEventCallback = Box<dyn FnOnce(&TcpEventData)>; +pub(crate) type TcpEventCallback = Box<dyn FnOnce(TcpEventData)>; #[derive(Debug, Clone, Hash, Eq, PartialEq)] pub enum TcpEvent { @@ -228,7 +228,7 @@ async fn listen( if let Some(vec) = event_queue.lock().unwrap().get_mut(&TcpEvent::Connected) { let old = std::mem::take(vec); for handler in old { - handler(&TcpEventData::Connected(&msg)); + handler(TcpEventData::Connected(&msg)); } } let mut state = state.lock().unwrap(); @@ -282,7 +282,7 @@ async fn listen( if let Some(vec) = event_queue.lock().unwrap().get_mut(&TcpEvent::Disconnected) { let old = std::mem::take(vec); for handler in old { - handler(&TcpEventData::Disconnected); + handler(TcpEventData::Disconnected); } } }, |
