diff options
Diffstat (limited to 'azalea-protocol/src/read.rs')
| -rwxr-xr-x | azalea-protocol/src/read.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 434cc74a..558e1072 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -1,6 +1,11 @@ //! Read packets from a stream. -use crate::packets::ProtocolPacket; +use std::backtrace::Backtrace; +use std::{ + fmt::Debug, + io::{Cursor, Read}, +}; + use azalea_buf::BufReadError; use azalea_buf::McBufVarReadable; use azalea_crypto::Aes128CfbDec; @@ -9,16 +14,13 @@ use bytes::BytesMut; use flate2::read::ZlibDecoder; use futures::StreamExt; use futures_lite::future; -use std::backtrace::Backtrace; -use std::{ - fmt::Debug, - io::{Cursor, Read}, -}; use thiserror::Error; use tokio::io::AsyncRead; use tokio_util::codec::{BytesCodec, FramedRead}; use tracing::trace; +use crate::packets::ProtocolPacket; + #[derive(Error, Debug)] pub enum ReadPacketError { #[error("Error reading packet {packet_name} (id {packet_id}): {source}")] |
