From ba911a8a207eb47df7a055410570767b2e33c2ae Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Dec 2021 15:17:42 -0600 Subject: correct minecraft-chat :tada: --- minecraft-protocol/src/connection.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'minecraft-protocol/src/connection.rs') diff --git a/minecraft-protocol/src/connection.rs b/minecraft-protocol/src/connection.rs index cfca403c..2fe03dfb 100644 --- a/minecraft-protocol/src/connection.rs +++ b/minecraft-protocol/src/connection.rs @@ -45,7 +45,7 @@ impl Connection { self.state = state; } - pub async fn read_packet(&mut self) -> Result<(), String> { + pub async fn read_packet(&mut self) -> Result { // what this does: // 1. reads the first 5 bytes, probably only some of this will be used to get the packet length // 2. how much we should read = packet length - 5 @@ -69,9 +69,7 @@ impl Connection { ) .await?; - println!("packet: {:?}", packet); - - Ok(()) + Ok(packet) } /// Write a packet to the server -- cgit v1.2.3