Add ref types to login and remove code coverage
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
// This file is automatically generated.
|
||||
// It is not intended for manual editing.
|
||||
use crate::chat::Message;
|
||||
use crate::DecodeError;
|
||||
use crate::Decoder;
|
||||
use minecraft_protocol_derive::Packet;
|
||||
use std::io::Read;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub enum LoginServerBoundPacket {
|
||||
LoginStart(LoginStart),
|
||||
@@ -113,7 +115,7 @@ impl LoginClientBoundPacket {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn disconnect(reason: String) -> Self {
|
||||
pub fn disconnect(reason: Chat) -> Self {
|
||||
let disconnect = Disconnect { reason };
|
||||
|
||||
Self::Disconnect(disconnect)
|
||||
@@ -133,7 +135,7 @@ impl LoginClientBoundPacket {
|
||||
Self::EncryptionRequest(encryption_request)
|
||||
}
|
||||
|
||||
pub fn success(uuid: String, username: String) -> Self {
|
||||
pub fn success(uuid: Uuid, username: String) -> Self {
|
||||
let success = Success { uuid, username };
|
||||
|
||||
Self::Success(success)
|
||||
@@ -177,7 +179,7 @@ pub struct LoginPluginResponse {
|
||||
|
||||
#[derive(Packet, Debug)]
|
||||
pub struct Disconnect {
|
||||
pub reason: String,
|
||||
pub reason: Chat,
|
||||
}
|
||||
|
||||
#[derive(Packet, Debug)]
|
||||
@@ -189,7 +191,8 @@ pub struct EncryptionRequest {
|
||||
|
||||
#[derive(Packet, Debug)]
|
||||
pub struct Success {
|
||||
pub uuid: String,
|
||||
#[packet(with = "uuid_hyp_str")]
|
||||
pub uuid: Uuid,
|
||||
pub username: String,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user