aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-01 22:15:22 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-01 22:15:22 +0200
commit86c2d75a8f9bd600da03a9a3637eb490eb6fa424 (patch)
treea42e498ae11bfcbe313232a03b7d688c05349637
parent4c830ed4e3a143ff95ac3bce15c928fd32a5e426 (diff)
downloadstatuspage-86c2d75a8f9bd600da03a9a3637eb490eb6fa424.tar
statuspage-86c2d75a8f9bd600da03a9a3637eb490eb6fa424.tar.bz2
statuspage-86c2d75a8f9bd600da03a9a3637eb490eb6fa424.tar.zst
replace serde_yaml with serde_yml
-rw-r--r--Cargo.lock28
-rw-r--r--Cargo.toml2
-rw-r--r--src/main.rs2
3 files changed, 19 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 647dfce..e783fd3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -724,6 +724,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
+name = "libyml"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3302702afa434ffa30847a83305f0a69d6abd74293b6554c18ec85c7ef30c980"
+dependencies = [
+ "anyhow",
+ "version_check",
+]
+
+[[package]]
name = "lock_api"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1242,16 +1252,18 @@ dependencies = [
]
[[package]]
-name = "serde_yaml"
-version = "0.9.34+deprecated"
+name = "serde_yml"
+version = "0.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
+checksum = "59e2dd588bf1597a252c3b920e0143eb99b0f76e4e082f4c92ce34fbc9e71ddd"
dependencies = [
"indexmap",
"itoa",
+ "libyml",
+ "memchr",
"ryu",
"serde",
- "unsafe-libyaml",
+ "version_check",
]
[[package]]
@@ -1328,7 +1340,7 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
- "serde_yaml",
+ "serde_yml",
"shlex",
"tokio",
]
@@ -1529,12 +1541,6 @@ dependencies = [
]
[[package]]
-name = "unsafe-libyaml"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
-
-[[package]]
name = "untrusted"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index cde9523..2979bd9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
axum = "0.7.5"
tokio = { version = "1.39.3", features = ["full"] }
-serde_yaml = "0.9.34+deprecated"
+serde_yml = "0.0.12"
serde = { version = "1.0.209", features = ["derive"] }
serde_json = "1.0.127"
anyhow = "1.0.86"
diff --git a/src/main.rs b/src/main.rs
index bd3ff32..bfa26a1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,7 +68,7 @@ async fn run() -> anyhow::Result<()> {
.nth(1)
.ok_or(anyhow!("expected config path as first argument"))?;
let config = read_to_string(config).await?;
- let config = Arc::<Config>::new(serde_yaml::from_str(&config)?);
+ let config = Arc::<Config>::new(serde_yml::from_str(&config)?);
for i in 0..config.services.len() {
tokio::task::spawn(check_loop(config.clone(), i));