Replace deprecated package
All checks were successful
Build and push container image / build (push) Successful in 7m13s

This commit is contained in:
toast 2024-01-02 14:42:40 +11:00
parent fd2e330a15
commit 8c4f409e37
3 changed files with 10 additions and 9 deletions

8
Cargo.lock generated
View File

@ -794,11 +794,11 @@ dependencies = [
[[package]] [[package]]
name = "kon" name = "kon"
version = "0.1.5" version = "0.1.6"
dependencies = [ dependencies = [
"cargo_toml", "cargo_toml",
"gamedig", "gamedig",
"lazy_static", "once_cell",
"poise", "poise",
"reqwest", "reqwest",
"serde_json", "serde_json",
@ -951,9 +951,9 @@ dependencies = [
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.18.0" version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]] [[package]]
name = "openssl" name = "openssl"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "kon" name = "kon"
version = "0.1.5" version = "0.1.6"
rust-version = "1.74" rust-version = "1.74"
edition = "2021" edition = "2021"
@ -9,7 +9,7 @@ edition = "2021"
[dependencies] [dependencies]
cargo_toml = "0.17.2" cargo_toml = "0.17.2"
gamedig = "0.4.1" gamedig = "0.4.1"
lazy_static = "1.4.0" once_cell = "1.19.0"
poise = "0.5.7" poise = "0.5.7"
reqwest = "0.11.23" reqwest = "0.11.23"
serde_json = "1.0.109" serde_json = "1.0.109"

View File

@ -18,13 +18,14 @@ use reqwest::{
Client, Client,
header::USER_AGENT header::USER_AGENT
}; };
use once_cell::sync::Lazy;
use cargo_toml::Manifest; use cargo_toml::Manifest;
use serde_json::Value; use serde_json::Value;
use tokio::join; use tokio::join;
lazy_static::lazy_static! { static PMS_BASE: Lazy<String> = Lazy::new(||
static ref PMS_BASE: String = var("WG_PMS").expect("Expected a \"WG_PMS\" in the envvar but none was found"); var("WG_PMS").expect("Expected a \"WG_PMS\" in the envvar but none was found")
} );
fn query_server() -> Result<Response, Error> { fn query_server() -> Result<Response, Error> {
let server_ip = var("ATS_SERVER_IP").expect("Expected a \"ATS_SERVER_IP\" in the envvar but none was found"); let server_ip = var("ATS_SERVER_IP").expect("Expected a \"ATS_SERVER_IP\" in the envvar but none was found");