Skip to content

Commit

Permalink
Use 'toml_edit' directly instead of via 'toml'.
Browse files Browse the repository at this point in the history
  • Loading branch information
mo8it authored and SergioBenitez committed May 31, 2024
1 parent dae213f commit 6a363a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
target/
**/*.rs.bk


# Added by cargo
#
# already existing elements were commented out

#/target
Cargo.lock
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ license = "MIT OR Apache-2.0"
categories = ["config"]

[features]
env = ["pear", "parse-value"]
env = ["parse-value"]
json = ["serde_json"]
yaml = ["serde_yaml"]
parse-value = ["pear"]
test = ["tempfile", "parking_lot"]
# toml = ["toml"]
toml = ["toml_edit"]
yaml = ["serde_yaml"]

[dependencies]
serde = { version = "1.0" }
serde = "1.0"
uncased = "0.9.3"
pear = { version = "0.2", optional = true }
toml = { version = "0.8", optional = true }
toml_edit = { version = "0.22", optional = true, default-features = false, features = ["parse", "serde"] }
serde_json = { version = "1.0", optional = true }
serde_yaml = { version = "0.9", optional = true }
tempfile = { version = "3", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/providers/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl YamlExtended {
}
}

impl_format!(Toml "TOML"/"toml": toml::from_str, toml::de::Error);
impl_format!(Toml "TOML"/"toml": toml_edit::de::from_str, toml_edit::de::Error);
impl_format!(Yaml "YAML"/"yaml": serde_yaml::from_str, serde_yaml::Error);
impl_format!(Json "JSON"/"json": serde_json::from_str, serde_json::error::Error);
impl_format!(YamlExtended "YAML Extended"/"yaml": YamlExtended::from_str, serde_yaml::Error);

0 comments on commit 6a363a1

Please sign in to comment.