From 6f6289376a0d9ffe7e58506824e37f6b380961c3 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 7 Oct 2022 23:56:23 -0500 Subject: fix errors with rewritten packet reading i forgot i never tested it before LMAO --- azalea-protocol/src/write.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-protocol/src/write.rs') diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index b2ae2810..a04979a5 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -69,7 +69,7 @@ async fn compression_encoder( } pub async fn write_packet( - packet: P, + packet: &P, stream: &mut W, compression_threshold: Option, cipher: &mut Option, @@ -78,7 +78,7 @@ where P: ProtocolPacket + Debug, W: AsyncWrite + Unpin + Send, { - let mut buf = packet_encoder(&packet).unwrap(); + let mut buf = packet_encoder(packet).unwrap(); if let Some(threshold) = compression_threshold { buf = compression_encoder(&buf, threshold).await.unwrap(); } -- cgit v1.2.3