diff options
Diffstat (limited to 'azalea-entity/src')
| -rw-r--r-- | azalea-entity/src/data.rs | 6 | ||||
| -rw-r--r-- | azalea-entity/src/lib.rs | 4 | ||||
| -rw-r--r-- | azalea-entity/src/plugin/indexing.rs | 4 |
3 files changed, 7 insertions, 7 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), diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs index 0f49039e..44a4a9ee 100644 --- a/azalea-entity/src/lib.rs +++ b/azalea-entity/src/lib.rs @@ -12,7 +12,7 @@ mod plugin; pub mod vec_delta_codec; use std::{ - fmt::Debug, + fmt::{self, Debug}, hash::{Hash, Hasher}, }; @@ -133,7 +133,7 @@ impl EntityUuid { } } impl Debug for EntityUuid { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { (self.0).fmt(f) } } diff --git a/azalea-entity/src/plugin/indexing.rs b/azalea-entity/src/plugin/indexing.rs index 0f1e036e..2fc89e84 100644 --- a/azalea-entity/src/plugin/indexing.rs +++ b/azalea-entity/src/plugin/indexing.rs @@ -2,7 +2,7 @@ use std::{ collections::{HashMap, HashSet}, - fmt::Debug, + fmt::{self, Debug}, }; use azalea_core::position::ChunkPos; @@ -115,7 +115,7 @@ impl EntityIdIndex { } impl Debug for EntityUuidIndex { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("EntityUuidIndex").finish() } } |
