mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-18 22:32:31 +00:00
fmt
This commit is contained in:
parent
6553d9510d
commit
8e2e81651c
2 changed files with 5 additions and 4 deletions
|
@ -51,7 +51,7 @@ use azalea_protocol::{
|
|||
serverbound_login_acknowledged_packet::ServerboundLoginAcknowledgedPacket,
|
||||
ClientboundLoginPacket,
|
||||
},
|
||||
ConnectionProtocol, ClientIntention, PROTOCOL_VERSION,
|
||||
ClientIntention, ConnectionProtocol, PROTOCOL_VERSION,
|
||||
},
|
||||
resolver, ServerAddress,
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@ where
|
|||
pub enum ClientIntention {
|
||||
Status = 1,
|
||||
Login = 2,
|
||||
Transfer = 3
|
||||
Transfer = 3,
|
||||
}
|
||||
|
||||
impl TryFrom<i32> for ClientIntention {
|
||||
|
@ -82,7 +82,8 @@ impl From<ClientIntention> for ConnectionProtocol {
|
|||
impl azalea_buf::McBufReadable for ClientIntention {
|
||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||
let id = i32::var_read_from(buf)?;
|
||||
id.try_into().map_err(|_| BufReadError::UnexpectedEnumVariant { id })
|
||||
id.try_into()
|
||||
.map_err(|_| BufReadError::UnexpectedEnumVariant { id })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue