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-core/src/difficulty.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-core/src/difficulty.rs') 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) } } -- cgit v1.2.3