From 4ff1025149d7f58ebcec43b8239b56b4409cf483 Mon Sep 17 00:00:00 2001 From: toast Date: Sat, 23 Mar 2024 10:41:29 +1100 Subject: [PATCH] Cleanup the leftover code from previous iteration --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/commands/status.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7faafb..6e9dd0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -911,7 +911,7 @@ dependencies = [ [[package]] name = "kon" -version = "0.2.3" +version = "0.2.4" dependencies = [ "cargo_toml", "gamedig", diff --git a/Cargo.toml b/Cargo.toml index c16bfb3..54288c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kon" -version = "0.2.3" +version = "0.2.4" rust-version = "1.75" edition = "2021" diff --git a/src/commands/status.rs b/src/commands/status.rs index 2c089c6..83a1aac 100644 --- a/src/commands/status.rs +++ b/src/commands/status.rs @@ -45,7 +45,7 @@ async fn pms_serverstatus(url: &str) -> Result)>, Error> let req = client.get(url).await?; let response = req.json::>().await?; - let data = response["data"].as_array().unwrap();//[0]["servers_statuses"]["data"].as_array().unwrap().clone(); + let data = response["data"].as_array().unwrap(); let mut servers = Vec::new(); for item in data { @@ -119,7 +119,6 @@ pub async fn wg(ctx: poise::Context<'_, (), Error>) -> Result<(), Error> { let embed = CreateEmbed::new().color(EMBED_COLOR); let (servers_asia, servers_eu) = join!(pms_serverstatus(&pms_asia), pms_serverstatus(&pms_eu)); - // let pms_servers = process_pms_statuses(vec![servers_eu.unwrap(), servers_asia.unwrap()]); let joined_pms_servers = [servers_eu.unwrap(), servers_asia.unwrap()].concat(); let pms_servers = process_pms_statuses(joined_pms_servers.to_vec());