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 | |
| parent | a16b9dcd2e7fa7c37140b2d178c9abf9ce8e1b34 (diff) | |
| download | azalea-drasl-b9cb596ea75b446d19e6ad066c750348be60f4c7.tar.xz | |
shut up clippy
| -rwxr-xr-x | azalea-core/src/game_type.rs | 4 | ||||
| -rwxr-xr-x | azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | 6 |
2 files changed, 3 insertions, 7 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 }) } } diff --git a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs index 93421cc2..128d372b 100755 --- a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs @@ -1,10 +1,6 @@ -use std::io::{Read, Write}; - -use super::ClientboundLoginPacket; use azalea_auth::game_profile::GameProfile; -use azalea_buf::{BufReadError, McBuf, McBufReadable, Readable, SerializableUuid, Writable}; +use azalea_buf::McBuf; use packet_macros::ClientboundLoginPacket; -use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] pub struct ClientboundGameProfilePacket { |
