diff options
| author | Ubuntu <github@matdoes.dev> | 2022-08-19 18:06:43 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-08-19 18:06:43 +0000 |
| commit | b9cb596ea75b446d19e6ad066c750348be60f4c7 (patch) | |
| tree | 8ead47a3def55f9f0bed0edd2dbc05414e304de5 /azalea-core | |
| parent | a16b9dcd2e7fa7c37140b2d178c9abf9ce8e1b34 (diff) | |
| download | azalea-drasl-b9cb596ea75b446d19e6ad066c750348be60f4c7.tar.xz | |
shut up clippy
Diffstat (limited to 'azalea-core')
| -rwxr-xr-x | azalea-core/src/game_type.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Self, BufReadError> { 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<Self, BufReadError> { 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 }) } } |
