From 1c9e089b7268fe4ffeeee5e594bb2d708470d2a1 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 15 Dec 2021 14:06:14 -0600 Subject: clippy --- minecraft-client/src/ping.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'minecraft-client/src/ping.rs') diff --git a/minecraft-client/src/ping.rs b/minecraft-client/src/ping.rs index 88c0a24a..ff869d4e 100644 --- a/minecraft-client/src/ping.rs +++ b/minecraft-client/src/ping.rs @@ -37,8 +37,8 @@ pub async fn ping_server( let packet = conn.read().await.unwrap(); - Ok(match packet { - StatusPacket::ClientboundStatusResponsePacket(p) => p, - _ => Err("Invalid packet type".to_string())?, - }) + match packet { + StatusPacket::ClientboundStatusResponsePacket(p) => Ok(*p), + _ => Err("Invalid packet type".to_string()), + } } -- cgit v1.2.3