summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Eades <danieleades@hotmail.com>2023-02-08 15:40:15 +0000
committerDaniel Eades <danieleades@hotmail.com>2023-02-08 15:40:15 +0000
commit2160613c6afc622673683d642d91d45b42b3d66c (patch)
tree88bfa9e4490975fa936c8be1f185c1f9dc436409
parent69bb5c7fbad5f90ed880a00b02f19c09197e745e (diff)
bump 'toml' dependency
-rw-r--r--Cargo.lock47
-rw-r--r--Cargo.toml2
-rw-r--r--src/book/init.rs4
3 files changed, 49 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 5ff67a16..0493a916 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -997,6 +997,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]]
+name = "nom8"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
name = "normalize-line-endings"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1492,6 +1501,15 @@ dependencies = [
]
[[package]]
+name = "serde_spanned"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
+dependencies = [
+ "serde",
+]
+
+[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1758,11 +1776,36 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.5.10"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f"
+checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6"
dependencies = [
"serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e6a7712b49e1775fb9a7b998de6635b299237f48b404dde71704f2e0e7f37e5"
+dependencies = [
+ "indexmap",
+ "nom8",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 7856e7de..4c9a64c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,7 +33,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shlex = "1"
tempfile = "3.0"
-toml = "0.5.1"
+toml = "0.7.2"
topological-sort = "0.2.2"
# Watch feature
diff --git a/src/book/init.rs b/src/book/init.rs
index dd3fa8b0..850101cc 100644
--- a/src/book/init.rs
+++ b/src/book/init.rs
@@ -98,7 +98,9 @@ impl BookBuilder {
fn write_book_toml(&self) -> Result<()> {
debug!("Writing book.toml");
let book_toml = self.root.join("book.toml");
- let cfg = toml::to_vec(&self.config).with_context(|| "Unable to serialize the config")?;
+ let cfg = toml::to_string(&self.config)
+ .with_context(|| "Unable to serialize the config")?
+ .into_bytes();
File::create(book_toml)
.with_context(|| "Couldn't create book.toml")?