Skip to content

Commit

Permalink
chore: Upgrade toml
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 24, 2024
1 parent 8534a09 commit 5061f76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/trycmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ serde = { version = "1.0", features = ["derive"] }
shlex = "1.1.0"
humantime = "2"
humantime-serde = "1"
toml_edit = { version = "0.19.14", features = ["serde"] }
toml_edit = { version = "0.22.13", features = ["serde"] }
escargot = { version = "0.5.7", optional = true }

schemars = { version = "0.8.3", features = ["preserve_order"], optional = true }
Expand Down
6 changes: 3 additions & 3 deletions crates/trycmd/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ fn overwrite_toml_output(
let raw = std::fs::read_to_string(path)
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
let mut doc = raw
.parse::<toml_edit::Document>()
.parse::<toml_edit::DocumentMut>()
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
if let Some(output_value) = doc.get_mut(output_field) {
*output_value = toml_edit::value(output);
Expand All @@ -363,7 +363,7 @@ fn overwrite_toml_output(
let raw = std::fs::read_to_string(path)
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
let mut doc = raw
.parse::<toml_edit::Document>()
.parse::<toml_edit::DocumentMut>()
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
doc[output_field] = toml_edit::Item::None;
std::fs::write(path, doc.to_string())
Expand All @@ -378,7 +378,7 @@ fn overwrite_toml_status(
status: std::process::ExitStatus,
raw: String,
) -> Result<String, toml_edit::TomlError> {
let mut doc = raw.parse::<toml_edit::Document>()?;
let mut doc = raw.parse::<toml_edit::DocumentMut>()?;
if let Some(code) = status.code() {
if status.success() {
match doc.get("status") {
Expand Down

0 comments on commit 5061f76

Please sign in to comment.