diff options
| author | mat <git@matdoes.dev> | 2024-10-26 05:29:26 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-10-26 05:29:26 +0000 |
| commit | 6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f (patch) | |
| tree | 3b65d2984a0cffbe5acb3d44d7e3b8b145c32f95 /azalea-buf | |
| parent | b762575db61cf775d603e11eb2bd27ae13bdc4e9 (diff) | |
| download | azalea-drasl-6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f.tar.xz | |
group imports with rustfmt
Diffstat (limited to 'azalea-buf')
| -rwxr-xr-x | azalea-buf/src/lib.rs | 3 | ||||
| -rwxr-xr-x | azalea-buf/src/read.rs | 6 | ||||
| -rwxr-xr-x | azalea-buf/src/serializable_uuid.rs | 4 | ||||
| -rwxr-xr-x | azalea-buf/src/write.rs | 6 |
4 files changed, 13 insertions, 6 deletions
diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index fbde3684..e1d1281f 100755 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -20,9 +20,10 @@ const MAX_STRING_LENGTH: u16 = 32767; #[cfg(test)] mod tests { - use super::*; use std::{collections::HashMap, io::Cursor}; + use super::*; + #[test] fn test_write_varint() { let mut buf = Vec::new(); diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index 882e2bce..8e406acb 100755 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -1,14 +1,16 @@ -use super::{UnsizedByteArray, MAX_STRING_LENGTH}; -use byteorder::{ReadBytesExt, BE}; use std::{ backtrace::Backtrace, collections::HashMap, hash::Hash, io::{Cursor, Read}, }; + +use byteorder::{ReadBytesExt, BE}; use thiserror::Error; use tracing::warn; +use super::{UnsizedByteArray, MAX_STRING_LENGTH}; + #[derive(Error, Debug)] pub enum BufReadError { #[error("Invalid VarInt")] diff --git a/azalea-buf/src/serializable_uuid.rs b/azalea-buf/src/serializable_uuid.rs index f42eed86..d4ec0315 100755 --- a/azalea-buf/src/serializable_uuid.rs +++ b/azalea-buf/src/serializable_uuid.rs @@ -1,7 +1,9 @@ -use crate::{read::BufReadError, McBufReadable, McBufWritable}; use std::io::{Cursor, Write}; + use uuid::Uuid; +use crate::{read::BufReadError, McBufReadable, McBufWritable}; + pub trait SerializableUuid { fn to_int_array(&self) -> [u32; 4]; fn from_int_array(array: [u32; 4]) -> Self; diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs index 61dedfd8..49215a5a 100755 --- a/azalea-buf/src/write.rs +++ b/azalea-buf/src/write.rs @@ -1,7 +1,9 @@ -use super::{UnsizedByteArray, MAX_STRING_LENGTH}; -use byteorder::{BigEndian, WriteBytesExt}; use std::{collections::HashMap, io::Write}; +use byteorder::{BigEndian, WriteBytesExt}; + +use super::{UnsizedByteArray, MAX_STRING_LENGTH}; + fn write_utf_with_len( buf: &mut impl Write, string: &str, |
