diff options
| author | mat <git@matdoes.dev> | 2025-05-30 19:36:59 -0800 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-05-30 19:36:59 -0800 |
| commit | ae4b1e85e669bc882d158509ef1eda46c6b2a72e (patch) | |
| tree | adf81cc01b0ce1575e95b99ad109fd92db1738f6 /azalea-protocol/src/packets/mod.rs | |
| parent | a64c6505049082175224802c5be51ac8f0cf4677 (diff) | |
| download | azalea-drasl-ae4b1e85e669bc882d158509ef1eda46c6b2a72e.tar.xz | |
fix clippy issues and improve formatting everywhere
Diffstat (limited to 'azalea-protocol/src/packets/mod.rs')
| -rw-r--r-- | azalea-protocol/src/packets/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index ade5c915..5e654491 100644 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -5,7 +5,7 @@ pub mod handshake; pub mod login; pub mod status; -use std::io::{Cursor, Write}; +use std::io::{self, Cursor, Write}; use azalea_buf::{AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; @@ -53,7 +53,7 @@ where /// Read a packet by its id, `ConnectionProtocol`, and flow fn read(id: u32, buf: &mut Cursor<&[u8]>) -> Result<Self, Box<ReadPacketError>>; - fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; + fn write(&self, buf: &mut impl Write) -> io::Result<()>; } pub trait Packet<Protocol> { @@ -98,7 +98,7 @@ impl azalea_buf::AzaleaRead for ClientIntention { } impl AzaleaWrite for ClientIntention { - fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { (*self as i32).azalea_write_var(buf) } } |
