From 86c2d75a8f9bd600da03a9a3637eb490eb6fa424 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 1 Sep 2024 22:15:22 +0200 Subject: replace serde_yaml with serde_yml --- Cargo.lock | 28 +++++++++++++++++----------- Cargo.toml | 2 +- src/main.rs | 2 +- 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 @@ -723,6 +723,16 @@ version = "0.2.158" 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" @@ -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", ] @@ -1528,12 +1540,6 @@ dependencies = [ "tinyvec", ] -[[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" 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::::new(serde_yaml::from_str(&config)?); + let config = Arc::::new(serde_yml::from_str(&config)?); for i in 0..config.services.len() { tokio::task::spawn(check_loop(config.clone(), i)); -- cgit v1.2.3-70-g09d2