Skip to content

Commit 3fa5d81

Browse files
committed
Bump serde_yaml
1 parent ffd47e3 commit 3fa5d81

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ indicatif = "0.17"
1717
inquire = { optional = true, git = "https://github.com/markcda/inquire.git", branch = "feat/reorder-values", features = ["reorder"] }
1818
mimalloc = "0.1.43"
1919
nix = { optional = true, version = "0.29", features = ["signal", "user"] }
20-
pretty_yaml = "0.5"
2120
regex = "1.11"
2221
russh = "0.49"
2322
safe-path = "0.1"
2423
serde = { version = "1.0", features = ["derive"] }
2524
serde_json = "1.0"
26-
serde_yaml = { git = "https://github.com/markcda/serde-yaml.git", tag = "0.9.35-3" }
25+
serde_yaml = { git = "https://github.com/markcda/serde-yaml.git", tag = "0.9.36" }
2726
smart-patcher = { git = "https://github.com/impulse-sw/smart-patcher", tag = "0.2.1", default-features = false }
2827
strip-ansi-escapes = "0.2"
2928
termimad = "0.20"

src/rw.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,7 @@ pub fn write<T: Serialize>(folder: impl AsRef<Path>, file: impl AsRef<Path>, con
9393

9494
let content = match path.extension().map(|v| v.to_string_lossy().to_string()).as_deref() {
9595
Some("json") => serde_json::to_string_pretty(config).map_err(|e| anyhow::anyhow!("{}", e)),
96-
Some("yaml") | Some("yml") => {
97-
let format_opts = pretty_yaml::config::FormatOptions::default();
98-
serde_yaml::to_string(config)
99-
.map_err(|e| anyhow::anyhow!("{}", e))
100-
.and_then(|text| pretty_yaml::format_text(&text, &format_opts).map_err(|e| anyhow::anyhow!("{}", e)))
101-
}
96+
Some("yaml") | Some("yml") => serde_yaml::to_string_pretty(config).map_err(|e| anyhow::anyhow!("{}", e)),
10297
Some("toml") => toml::to_string_pretty(config).map_err(|e| anyhow::anyhow!("{}", e)),
10398
_ => {
10499
log("No supported format!");

0 commit comments

Comments
 (0)