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-core/src/difficulty.rs | |
| parent | a64c6505049082175224802c5be51ac8f0cf4677 (diff) | |
| download | azalea-drasl-ae4b1e85e669bc882d158509ef1eda46c6b2a72e.tar.xz | |
fix clippy issues and improve formatting everywhere
Diffstat (limited to 'azalea-core/src/difficulty.rs')
| -rw-r--r-- | azalea-core/src/difficulty.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-core/src/difficulty.rs b/azalea-core/src/difficulty.rs index b907bbb3..f82f0e9d 100644 --- a/azalea-core/src/difficulty.rs +++ b/azalea-core/src/difficulty.rs @@ -1,6 +1,6 @@ use std::{ - fmt::{Debug, Error, Formatter}, - io::{Cursor, Write}, + fmt::{self, Debug}, + io::{self, Cursor, Write}, }; use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; @@ -18,7 +18,7 @@ pub enum Err { } impl Debug for Err { - fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Err::InvalidDifficulty(s) => write!(f, "Invalid difficulty: {s}"), } @@ -73,7 +73,7 @@ impl AzaleaRead for Difficulty { } impl AzaleaWrite for Difficulty { - fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { u8::azalea_write(&self.id(), buf) } } |
