diff options
| author | mat <github@matdoes.dev> | 2022-07-29 16:29:06 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-07-29 16:29:06 -0500 |
| commit | 0c2ce00bae1d0a4711ad45f5558286dccb04b0ae (patch) | |
| tree | 10caad360580b31997d949915e0ba1dadc1a1638 /azalea-client/src/ping.rs | |
| parent | 0f380f1a129fbba936605990959f0cf4878c36a8 (diff) | |
| download | azalea-drasl-0c2ce00bae1d0a4711ad45f5558286dccb04b0ae.tar.xz | |
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
Diffstat (limited to 'azalea-client/src/ping.rs')
| -rwxr-xr-x | azalea-client/src/ping.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<ClientboundStatusResponsePacket, String> { 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( |
