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.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
index 20af1bec..06f346c2 100755
--- a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
+++ b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
@@ -1,4 +1,4 @@
-use std::hash::Hash;
+use std::{hash::Hash, io::Read};
use super::LoginPacket;
use crate::mc_buf::Readable;
@@ -19,12 +19,10 @@ impl ClientboundHelloPacket {
panic!("ClientboundHelloPacket::write not implemented")
}
- pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
- buf: &mut T,
- ) -> Result<LoginPacket, String> {
- let server_id = buf.read_utf_with_len(20).await?;
- let public_key = buf.read_byte_array().await?;
- let nonce = buf.read_byte_array().await?;
+ 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()?;
Ok(ClientboundHelloPacket {
server_id,