diff --git a/Cargo.toml b/Cargo.toml index c643a78..aefb90a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,14 +13,14 @@ edition = "2021" ron = { version = "0.8.0", optional = true } directories = "5" serde = "^1.0" -serde_yaml = { version = "0.9", optional = true } +serde_yml = { version = "0.0.10", optional = true } thiserror = "1.0" toml = { version = "0.8", optional = true } [features] default = ["toml_conf"] toml_conf = ["toml"] -yaml_conf = ["serde_yaml"] +yaml_conf = ["serde_yml"] ron_conf = ["ron"] [[example]] diff --git a/src/lib.rs b/src/lib.rs index b690772..e002a3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -115,7 +115,7 @@ pub enum ConfyError { #[cfg(feature = "yaml_conf")] #[error("Bad YAML data")] - BadYamlData(#[source] serde_yaml::Error), + BadYamlData(#[source] serde_yml::Error), #[cfg(feature = "ron_conf")] #[error("Bad RON data")] @@ -136,7 +136,7 @@ pub enum ConfyError { #[cfg(feature = "yaml_conf")] #[error("Failed to serialize configuration data into YAML")] - SerializeYamlError(#[source] serde_yaml::Error), + SerializeYamlError(#[source] serde_yml::Error), #[cfg(feature = "ron_conf")] #[error("Failed to serialize configuration data into RON")] @@ -213,7 +213,7 @@ pub fn load_path( } #[cfg(feature = "yaml_conf")] { - let cfg_data = serde_yaml::from_str(&cfg_string); + let cfg_data = serde_yml::from_str(&cfg_string); cfg_data.map_err(ConfyError::BadYamlData) } #[cfg(feature = "ron_conf")] @@ -273,7 +273,7 @@ where } #[cfg(feature = "yaml_conf")] { - let cfg_data = serde_yaml::from_str(&cfg_string); + let cfg_data = serde_yml::from_str(&cfg_string); cfg_data.map_err(ConfyError::BadYamlData) } #[cfg(feature = "ron_conf")] @@ -386,7 +386,7 @@ fn do_store( } #[cfg(feature = "yaml_conf")] { - s = serde_yaml::to_string(&cfg).map_err(ConfyError::SerializeYamlError)?; + s = serde_yml::to_string(&cfg).map_err(ConfyError::SerializeYamlError)?; } #[cfg(feature = "ron_conf")] {