aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/write.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-10-26 05:29:26 +0000
committermat <git@matdoes.dev>2024-10-26 05:29:26 +0000
commit6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f (patch)
tree3b65d2984a0cffbe5acb3d44d7e3b8b145c32f95 /azalea-protocol/src/write.rs
parentb762575db61cf775d603e11eb2bd27ae13bdc4e9 (diff)
downloadazalea-drasl-6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f.tar.xz
group imports with rustfmt
Diffstat (limited to 'azalea-protocol/src/write.rs')
-rwxr-xr-xazalea-protocol/src/write.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs
index 532f4651..0ec4308b 100755
--- a/azalea-protocol/src/write.rs
+++ b/azalea-protocol/src/write.rs
@@ -1,14 +1,16 @@
//! Write packets to a stream.
-use crate::{packets::ProtocolPacket, read::MAXIMUM_UNCOMPRESSED_LENGTH};
+use std::{fmt::Debug, io::Read};
+
use azalea_buf::McBufVarWritable;
use azalea_crypto::Aes128CfbEnc;
use flate2::{bufread::ZlibEncoder, Compression};
-use std::{fmt::Debug, io::Read};
use thiserror::Error;
use tokio::io::{AsyncWrite, AsyncWriteExt};
use tracing::trace;
+use crate::{packets::ProtocolPacket, read::MAXIMUM_UNCOMPRESSED_LENGTH};
+
/// Prepend the length of the packet to it.
fn frame_prepender(mut data: Vec<u8>) -> Result<Vec<u8>, std::io::Error> {
let mut buf = Vec::new();