From ff8e3f2d9e4752cf3ecf8ed80041ab352cceb870 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 15 Dec 2021 19:10:44 -0600 Subject: reading packets is now friendlier --- minecraft-protocol/src/packets/login/clientbound_hello_packet.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'minecraft-protocol/src/packets/login') diff --git a/minecraft-protocol/src/packets/login/clientbound_hello_packet.rs b/minecraft-protocol/src/packets/login/clientbound_hello_packet.rs index 2041497a..36a48706 100644 --- a/minecraft-protocol/src/packets/login/clientbound_hello_packet.rs +++ b/minecraft-protocol/src/packets/login/clientbound_hello_packet.rs @@ -1,7 +1,7 @@ use std::hash::Hash; use tokio::io::BufReader; -use crate::mc_buf; +use crate::mc_buf::Readable; use super::LoginPacket; @@ -24,9 +24,9 @@ impl ClientboundHelloPacket { pub async fn read( buf: &mut BufReader, ) -> Result { - let server_id = mc_buf::read_utf_with_len(buf, 20).await?; - let public_key = mc_buf::read_byte_array(buf).await?; - let nonce = mc_buf::read_byte_array(buf).await?; + 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?; Ok(ClientboundHelloPacket { server_id, -- cgit v1.2.3