From b9cb596ea75b446d19e6ad066c750348be60f4c7 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 19 Aug 2022 18:06:43 +0000 Subject: shut up clippy --- azalea-core/src/game_type.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-core/src') diff --git a/azalea-core/src/game_type.rs b/azalea-core/src/game_type.rs index 429af324..875e8f3b 100755 --- a/azalea-core/src/game_type.rs +++ b/azalea-core/src/game_type.rs @@ -81,7 +81,7 @@ impl GameType { impl McBufReadable for GameType { fn read_from(buf: &mut impl Read) -> Result { let id = u8::read_from(buf)?; - GameType::from_id(id).ok_or_else(|| BufReadError::UnexpectedEnumVariant { id: id as i32 }) + GameType::from_id(id).ok_or(BufReadError::UnexpectedEnumVariant { id: id as i32 }) } } @@ -111,7 +111,7 @@ impl McBufReadable for OptionalGameType { fn read_from(buf: &mut impl Read) -> Result { let id = i8::read_from(buf)?; GameType::from_optional_id(id) - .ok_or_else(|| BufReadError::UnexpectedEnumVariant { id: id as i32 }) + .ok_or(BufReadError::UnexpectedEnumVariant { id: id as i32 }) } } -- cgit v1.2.3