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/game/c_map_item_data.rs | |
| parent | a64c6505049082175224802c5be51ac8f0cf4677 (diff) | |
| download | azalea-drasl-ae4b1e85e669bc882d158509ef1eda46c6b2a72e.tar.xz | |
fix clippy issues and improve formatting everywhere
Diffstat (limited to 'azalea-protocol/src/packets/game/c_map_item_data.rs')
| -rw-r--r-- | azalea-protocol/src/packets/game/c_map_item_data.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/game/c_map_item_data.rs b/azalea-protocol/src/packets/game/c_map_item_data.rs index 9a41ed85..f8c036e3 100644 --- a/azalea-protocol/src/packets/game/c_map_item_data.rs +++ b/azalea-protocol/src/packets/game/c_map_item_data.rs @@ -1,3 +1,5 @@ +use std::io::{self, Cursor, Write}; + use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite}; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; @@ -27,7 +29,7 @@ pub struct MapDecoration { pub struct OptionalMapPatch(pub Option<MapPatch>); impl AzaleaRead for OptionalMapPatch { - fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result<Self, azalea_buf::BufReadError> { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, azalea_buf::BufReadError> { let pos = buf.position(); Ok(Self(if u8::azalea_read(buf)? == 0 { None @@ -39,7 +41,7 @@ impl AzaleaRead for OptionalMapPatch { } impl AzaleaWrite for OptionalMapPatch { - fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { match &self.0 { None => 0u8.azalea_write(buf), Some(m) => m.azalea_write(buf), |
