aboutsummaryrefslogtreecommitdiff
path: root/minecraft-protocol/src/resolver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'minecraft-protocol/src/resolver.rs')
-rw-r--r--minecraft-protocol/src/resolver.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/minecraft-protocol/src/resolver.rs b/minecraft-protocol/src/resolver.rs
index b751e05f..24687a6e 100644
--- a/minecraft-protocol/src/resolver.rs
+++ b/minecraft-protocol/src/resolver.rs
@@ -29,8 +29,7 @@ pub async fn resolve_address(address: &ServerAddress) -> Result<ServerIpAddress,
.await;
// if it resolves that means it's a redirect so we call resolve_address again with the new host
- if srv_redirect_result.is_ok() {
- let redirect_result = srv_redirect_result.unwrap();
+ if let Ok(redirect_result) = srv_redirect_result {
let redirect_srv = redirect_result
.iter()
.next()