From 43a55421900c004329374441d916d8d840f5d203 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:36:58 +0000 Subject: [PATCH] Bump toml from 0.5.9 to 0.7.6 Bumps [toml](https://github.com/toml-rs/toml) from 0.5.9 to 0.7.6. - [Commits](https://github.com/toml-rs/toml/commits/toml-v0.7.6) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- CHANGELOG.md | 2 +- Cargo.lock | 73 +++++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- ext/otp_cache.rs | 5 ++-- 4 files changed, 74 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32e14bd1..0b28692a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ Unreleased - Bumped `libc` dependency to `0.2.159` - Bumped `serde` dependency to `1.0.147` - Bumped `structopt` dependency to `0.3.26` -- Bumped `toml` dependency to `0.5.9` +- Bumped `toml` dependency to `0.7.6` 0.4.1 diff --git a/Cargo.lock b/Cargo.lock index ad935c89..3fc902ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,6 +88,12 @@ dependencies = [ "serde", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "fastrand" version = "1.7.0" @@ -128,6 +134,12 @@ dependencies = [ "anyhow", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.3.3" @@ -137,6 +149,16 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown", +] + [[package]] name = "instant" version = "0.1.12" @@ -169,9 +191,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "merge" @@ -411,6 +433,15 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + [[package]] name = "structopt" version = "0.3.26" @@ -483,11 +514,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] @@ -613,3 +669,12 @@ name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] diff --git a/Cargo.toml b/Cargo.toml index e6f89301..9775e7f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,7 +74,7 @@ default-features = false version = "1.5.5" [dependencies.toml] -version = "0.5.6" +version = "0.7.6" [dev-dependencies.nitrokey-test] version = "0.5" diff --git a/ext/otp_cache.rs b/ext/otp_cache.rs index 12cb4778..8594dc74 100644 --- a/ext/otp_cache.rs +++ b/ext/otp_cache.rs @@ -125,8 +125,9 @@ fn save_cache(cache: &Cache, path: &path::Path) -> anyhow::Result<()> { fs::create_dir_all(parent).context("Failed to create cache parent directory")?; } let mut f = fs::File::create(path).context("Failed to create cache file")?; - let data = toml::to_vec(cache).context("Failed to serialize cache")?; - f.write_all(&data).context("Failed to write cache file")?; + let data = toml::to_string(cache).context("Failed to serialize cache")?; + f.write_all(data.as_bytes()) + .context("Failed to write cache file")?; Ok(()) }