From 90fbe112af0d1c9e45e381d653cb902a74d5ea30 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 13 Feb 2023 07:31:33 -0800 Subject: [PATCH] Revert "bump 'toml' dependency" --- Cargo.lock | 47 ++--------------------------------------------- Cargo.toml | 2 +- src/book/init.rs | 4 +--- 3 files changed, 4 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a6dd2e2c0..45ed9fdd6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -979,15 +979,6 @@ version = "1.0.4" 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" @@ -1483,15 +1474,6 @@ dependencies = [ "serde", ] -[[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" @@ -1759,36 +1741,11 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.2" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" 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 e84b09fa6c..a9efe64589 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.7.2" +toml = "0.5.1" topological-sort = "0.2.2" # Watch feature diff --git a/src/book/init.rs b/src/book/init.rs index b3d6dd397a..ebcdd9349c 100644 --- a/src/book/init.rs +++ b/src/book/init.rs @@ -99,9 +99,7 @@ impl BookBuilder { fn write_book_toml(&self) -> Result<()> { debug!("Writing book.toml"); let book_toml = self.root.join("book.toml"); - let cfg = toml::to_string(&self.config) - .with_context(|| "Unable to serialize the config")? - .into_bytes(); + let cfg = toml::to_vec(&self.config).with_context(|| "Unable to serialize the config")?; File::create(book_toml) .with_context(|| "Couldn't create book.toml")?