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-entity/src/data.rs | |
| parent | a64c6505049082175224802c5be51ac8f0cf4677 (diff) | |
| download | azalea-drasl-ae4b1e85e669bc882d158509ef1eda46c6b2a72e.tar.xz | |
fix clippy issues and improve formatting everywhere
Diffstat (limited to 'azalea-entity/src/data.rs')
| -rw-r--r-- | azalea-entity/src/data.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index c92d1c95..24e31713 100644 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -1,6 +1,6 @@ //! Define some types needed for entity metadata. -use std::io::{Cursor, Write}; +use std::io::{self, Cursor, Write}; use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_chat::FormattedText; @@ -43,7 +43,7 @@ impl AzaleaRead for EntityMetadataItems { } impl AzaleaWrite for EntityMetadataItems { - fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { for item in &self.0 { item.index.azalea_write(buf)?; item.value.azalea_write(buf)?; @@ -128,7 +128,7 @@ impl AzaleaRead for OptionalUnsignedInt { } } impl AzaleaWrite for OptionalUnsignedInt { - fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { match self.0 { Some(val) => (val + 1).azalea_write_var(buf), None => 0u32.azalea_write_var(buf), |
