Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 64 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ maintenance = { status = "actively-developed" }
[features]
default = ["toml", "json", "yaml", "ini", "ron", "json5", "convert-case", "async"]
json = ["serde_json"]
yaml = ["yaml-rust"]
yaml = ["yaml-rust2"]
ini = ["rust-ini"]
json5 = ["json5_rs", "serde/derive"]
convert-case = ["convert_case"]
Expand All @@ -32,7 +32,7 @@ nom = "7"
async-trait = { version = "0.1", optional = true }
toml = { version = "0.8", optional = true }
serde_json = { version = "1.0", optional = true }
yaml-rust = { version = "0.4", optional = true }
yaml-rust2 = { version = "0.8", optional = true }
rust-ini = { version = "0.20", optional = true }
ron = { version = "0.8", optional = true }
json5_rs = { version = "0.4", optional = true, package = "json5" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

[JSON]: https://github.com/serde-rs/json
[TOML]: https://github.com/toml-lang/toml
[YAML]: https://github.com/chyh1990/yaml-rust
[YAML]: https://github.com/Ethiraric/yaml-rust2
[INI]: https://github.com/zonyitoo/rust-ini
[RON]: https://github.com/ron-rs/ron
[JSON5]: https://github.com/callum-oakley/json5-rs
Expand Down
2 changes: 1 addition & 1 deletion src/file/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub enum FileFormat {
#[cfg(feature = "json")]
Json,

/// YAML (parsed with yaml_rust)
/// YAML (parsed with yaml_rust2)
#[cfg(feature = "yaml")]
Yaml,

Expand Down
2 changes: 1 addition & 1 deletion src/file/format/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::error::Error;
use std::fmt;
use std::mem;

use yaml_rust as yaml;
use yaml_rust2 as yaml;

use crate::format;
use crate::map::Map;
Expand Down
3 changes: 1 addition & 2 deletions tests/file_yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ fn test_error_parse() {
assert_eq!(
res.unwrap_err().to_string(),
format!(
"while parsing a block mapping, did not find expected key at \
line 2 column 1 in {}",
"simple key expect ':' at byte 21 line 3 column 1 in {}",
path_with_extension.display()
)
);
Expand Down
3 changes: 1 addition & 2 deletions tests/legacy/file_yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ fn test_error_parse() {
assert_eq!(
res.unwrap_err().to_string(),
format!(
"while parsing a block mapping, did not find expected key at \
line 2 column 1 in {}",
"simple key expect ':' at byte 21 line 3 column 1 in {}",
path_with_extension.display()
)
);
Expand Down