diff options
-rw-r--r-- | Cargo.lock | 28 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
3 files changed, 19 insertions, 13 deletions
@@ -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" @@ -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)); |