mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
shut up clippy
This commit is contained in:
parent
a16b9dcd2e
commit
b9cb596ea7
2 changed files with 3 additions and 7 deletions
|
@ -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 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue