Skip to content

Commit

Permalink
Bump toml from 0.5.11 to 0.7.0 (#89)
Browse files Browse the repository at this point in the history
Bumps [toml](https://github.com/toml-rs/toml) from 0.5.11 to 0.7.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Sirois <john.sirois@gmail.com>
  • Loading branch information
dependabot[bot] and jsirois authored Jan 30, 2023
1 parent b0dd9af commit 4f06c9d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 5 deletions.
63 changes: 61 additions & 2 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ logging_timer = "1.1"
nix = "0.26"
serde = { version = "1.0", features = ["derive"] }
tempfile = { workspace = true }
toml = "0.5"
toml = "0.7"
uuid = { version = "1.2", features = ["v4"] }
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ impl PantsConfig {
#[time("debug", "PantsConfig::{}")]
pub(crate) fn parse(build_root: BuildRoot) -> Result<PantsConfig> {
let pants_config = build_root.join("pants.toml");
let contents = std::fs::read(&pants_config).with_context(|| {
let contents = std::fs::read_to_string(&pants_config).with_context(|| {
format!(
"Failed to read Pants config from {path}",
path = pants_config.display()
)
})?;
let config: Config = toml::from_slice(contents.as_slice()).with_context(|| {
let config: Config = toml::from_str(&contents).with_context(|| {
format!(
"Failed to parse Pants config from {path}",
path = pants_config.display()
Expand Down

0 comments on commit 4f06c9d

Please sign in to comment.