From ae4b1e85e669bc882d158509ef1eda46c6b2a72e Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 30 May 2025 19:36:59 -0800 Subject: fix clippy issues and improve formatting everywhere --- azalea-protocol/src/packets/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-protocol/src/packets/mod.rs') 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>; - fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; + fn write(&self, buf: &mut impl Write) -> io::Result<()>; } pub trait Packet { @@ -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) } } -- cgit v1.2.3