Rustify, I guess.
All checks were successful
Build and push container image / build (push) Successful in 10m26s
All checks were successful
Build and push container image / build (push) Successful in 10m26s
This commit is contained in:
parent
2b7f55bdbd
commit
3ccd5ac51d
@ -71,7 +71,7 @@ async fn gs_query_minecraft(server_ip: &str) -> Result<MinecraftQueryData, Error
|
|||||||
let data: MinecraftQueryData = req.json().await?;
|
let data: MinecraftQueryData = req.json().await?;
|
||||||
Ok(data)
|
Ok(data)
|
||||||
} else {
|
} else {
|
||||||
return Err(Error::from("Failed to query the server."));
|
Err(Error::from("Failed to query the server."))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ pub async fn gs(
|
|||||||
|
|
||||||
// Extract values from a Vec above
|
// Extract values from a Vec above
|
||||||
let game_name = &server_data[1];
|
let game_name = &server_data[1];
|
||||||
let ip_address = &server_data[2];
|
let ip_address = &server_data[2];
|
||||||
|
|
||||||
match game_name.as_str() {
|
match game_name.as_str() {
|
||||||
"Minecraft" => {
|
"Minecraft" => {
|
||||||
@ -153,10 +153,7 @@ pub async fn gs(
|
|||||||
).await?;
|
).await?;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {}
|
||||||
ctx.send(CreateReply::default().content("Game not supported yet.")).await?;
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user