diff options
| author | mat <github@matdoes.dev> | 2022-10-07 23:56:23 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-07 23:56:23 -0500 |
| commit | 6f6289376a0d9ffe7e58506824e37f6b380961c3 (patch) | |
| tree | 97956fc560b338fbef630f0d0617a248e0e8b336 /azalea-protocol/src/write.rs | |
| parent | e9d8d0357ee63cce321e177bf19a8974699894ee (diff) | |
| download | azalea-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-x | azalea-protocol/src/write.rs | 4 |
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(); } |
