aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/write.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-10-07 23:56:23 -0500
committermat <github@matdoes.dev>2022-10-07 23:56:23 -0500
commit6f6289376a0d9ffe7e58506824e37f6b380961c3 (patch)
tree97956fc560b338fbef630f0d0617a248e0e8b336 /azalea-protocol/src/write.rs
parente9d8d0357ee63cce321e177bf19a8974699894ee (diff)
downloadazalea-drasl-6f6289376a0d9ffe7e58506824e37f6b380961c3.tar.xz
fix errors with rewritten packet reading
i forgot i never tested it before LMAO
Diffstat (limited to 'azalea-protocol/src/write.rs')
-rwxr-xr-xazalea-protocol/src/write.rs4
1 files changed, 2 insertions, 2 deletions
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<P, W>(
- packet: P,
+ packet: &P,
stream: &mut W,
compression_threshold: Option<u32>,
cipher: &mut Option<Aes128CfbEnc>,
@@ -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();
}