summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock69
-rw-r--r--Cargo.toml4
-rw-r--r--src/config.rs2
3 files changed, 24 insertions, 51 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 7eda303..ee63174 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -289,7 +289,7 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
[[package]]
name = "gnix"
-version = "0.1.0"
+version = "1.0.0"
dependencies = [
"anyhow",
"bytes",
@@ -309,11 +309,11 @@ dependencies = [
"rustls",
"rustls-pemfile",
"serde",
+ "serde_yaml",
"thiserror",
"tokio",
"tokio-rustls",
"tokio-util",
- "toml",
]
[[package]]
@@ -817,6 +817,12 @@ dependencies = [
]
[[package]]
+name = "ryu"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
+
+[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -853,12 +859,16 @@ dependencies = [
]
[[package]]
-name = "serde_spanned"
-version = "0.6.3"
+name = "serde_yaml"
+version = "0.9.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186"
+checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574"
dependencies = [
+ "indexmap 2.0.0",
+ "itoa",
+ "ryu",
"serde",
+ "unsafe-libyaml",
]
[[package]]
@@ -1018,40 +1028,6 @@ dependencies = [
]
[[package]]
-name = "toml"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542"
-dependencies = [
- "serde",
- "serde_spanned",
- "toml_datetime",
- "toml_edit",
-]
-
-[[package]]
-name = "toml_datetime"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.19.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a"
-dependencies = [
- "indexmap 2.0.0",
- "serde",
- "serde_spanned",
- "toml_datetime",
- "winnow",
-]
-
-[[package]]
name = "tracing"
version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1099,6 +1075,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
[[package]]
+name = "unsafe-libyaml"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa"
+
+[[package]]
name = "untrusted"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1351,12 +1333,3 @@ name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
-
-[[package]]
-name = "winnow"
-version = "0.5.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc"
-dependencies = [
- "memchr",
-]
diff --git a/Cargo.toml b/Cargo.toml
index 6d2761a..34017d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "gnix"
-version = "0.1.0"
+version = "1.0.0"
edition = "2021"
[dependencies]
@@ -26,7 +26,7 @@ pin-project = "1.1.3"
# Config
serde = { version = "1.0.188", features = ["derive"] }
-toml = "0.7.6"
+serde_yaml = "0.9.25"
# Logging
env_logger = "0.10.0"
diff --git a/src/config.rs b/src/config.rs
index c250b80..c02af52 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -84,7 +84,7 @@ where
impl Config {
pub fn load(path: &str) -> anyhow::Result<Config> {
let raw = read_to_string(path).context("reading config file")?;
- let config: Config = toml::from_str(&raw).context("parsing config")?;
+ let config: Config = serde_yaml::from_str(&raw).context("parsing config")?;
Ok(config)
}
}