From 0c2ce00bae1d0a4711ad45f5558286dccb04b0ae Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 29 Jul 2022 16:29:06 -0500 Subject: make Connection a single struct with generics This isn't that good of a solution but I couldn't come up with a better one and this was pretty simple to implement --- azalea-client/src/ping.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-client/src/ping.rs') diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index c4ef2915..e4acfc34 100755 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -1,6 +1,6 @@ ///! Ping Minecraft servers. use azalea_protocol::{ - connect::HandshakeConnection, + connect::Connection, packets::{ handshake::client_intention_packet::ClientIntentionPacket, status::{ @@ -18,7 +18,7 @@ pub async fn ping_server( ) -> Result { let resolved_address = resolver::resolve_address(address).await?; - let mut conn = HandshakeConnection::new(&resolved_address).await?; + let mut conn = Connection::new(&resolved_address).await?; // send the client intention packet and switch to the status state conn.write( -- cgit v1.2.3