Skip to content

Commit f507071

Browse files
authored
Merge pull request #1210 from coreos/dependabot/cargo/toml-0.8.15
build(deps): bump toml from 0.5.11 to 0.8.15
2 parents 6c30843 + 33ae5f5 commit f507071

File tree

5 files changed

+48
-11
lines changed

5 files changed

+48
-11
lines changed

Cargo.lock

Lines changed: 41 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ serde_json = "1.0"
4343
tempfile = ">= 3.7, < 4.0"
4444
thiserror = "2.0"
4545
tokio = { version = "1.42", features = ["signal", "rt", "rt-multi-thread"] }
46-
toml = "0.5"
46+
toml = ">= 0.8, < 0.9"
4747
tzfile = "0.1.3"
4848
url = { version = "2.5", features = ["serde"] }
4949
users = "0.11.0"

src/config/fragments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ mod tests {
102102

103103
#[test]
104104
fn basic_dist_config_sample() {
105-
let content = std::fs::read("tests/fixtures/00-config-sample.toml").unwrap();
106-
let cfg: ConfigFragment = toml::from_slice(&content).unwrap();
105+
let content = std::fs::read_to_string("tests/fixtures/00-config-sample.toml").unwrap();
106+
let cfg: ConfigFragment = toml::from_str(&content).unwrap();
107107

108108
let expected = ConfigFragment {
109109
agent: Some(AgentFragment {

src/config/inputs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ impl ConfigInput {
2828
for (_, fpath) in liboverdrop::scan(dirs, common_path, extensions.as_slice(), true) {
2929
trace!("reading config fragment '{}'", fpath.display());
3030

31-
let content = std::fs::read(&fpath)
31+
let content = std::fs::read_to_string(&fpath)
3232
.with_context(|| format!("failed to read file '{}'", fpath.display()))?;
3333
let frag: fragments::ConfigFragment =
34-
toml::from_slice(&content).context("failed to parse TOML")?;
34+
toml::from_str(&content).context("failed to parse TOML")?;
3535

3636
fragments.push(frag);
3737
}

src/strategy/periodic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ mod tests {
298298
}
299299

300300
fn parse_config_input(config_path: &str) -> inputs::ConfigInput {
301-
let content = std::fs::read(config_path).unwrap();
302-
let frag: fragments::ConfigFragment = toml::from_slice(&content).unwrap();
301+
let content = std::fs::read_to_string(config_path).unwrap();
302+
let frag: fragments::ConfigFragment = toml::from_str(&content).unwrap();
303303
inputs::ConfigInput::merge_fragments(vec![frag])
304304
}
305305
}

0 commit comments

Comments
 (0)