aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/login/clientbound_hello_packet.rs')
-rwxr-xr-xazalea-protocol/src/packets/login/clientbound_hello_packet.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
index 06f346c2..f7de4c21 100755
--- a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
+++ b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
@@ -1,4 +1,7 @@
-use std::{hash::Hash, io::Read};
+use std::{
+ hash::Hash,
+ io::{Read, Write},
+};
use super::LoginPacket;
use crate::mc_buf::Readable;
@@ -15,11 +18,11 @@ impl ClientboundHelloPacket {
LoginPacket::ClientboundHelloPacket(self)
}
- pub fn write(&self, _buf: &mut Vec<u8>) -> Result<(), std::io::Error> {
+ pub fn write(&self, _buf: &mut impl Write) -> Result<(), std::io::Error> {
panic!("ClientboundHelloPacket::write not implemented")
}
- pub fn read(buf: &mut impl Read) -> Result<LoginPacket, String> {
+ pub fn read(buf: &mut impl Read) -> Result<LoginPacket, String> {
let server_id = buf.read_utf_with_len(20)?;
let public_key = buf.read_byte_array()?;
let nonce = buf.read_byte_array()?;